[FIX] website#ir.http: do not postprocess arguments on non `website_enabled` endpoints
authorFabien Meghazi <fme@openerp.com>
Wed, 12 Mar 2014 14:35:39 +0000 (15:35 +0100)
committerFabien Meghazi <fme@openerp.com>
Wed, 12 Mar 2014 14:35:39 +0000 (15:35 +0100)
bzr revid: fme@openerp.com-20140312143539-bzf54zlzeawqkfuo

addons/website/models/ir_http.py

index f731383..47c0853 100644 (file)
@@ -79,6 +79,9 @@ class ir_http(orm.AbstractModel):
         return self._dispatch()
 
     def _postprocess_args(self, arguments, rule):
+        if not getattr(request, 'website_enabled', False):
+            return super(ir_http, self)._postprocess_args(arguments, rule)
+
         for arg, val in arguments.items():
             # Replace uid placeholder by the current request.uid
             if isinstance(val, orm.browse_record) and isinstance(val._uid, RequestUID):