Added request in the list of first arguments for methods to wrap
bzr revid: nicolas.vanhoren@openerp.com-20130605084221-zyi54wa4ci36e2dd
This commit is contained in:
parent
7735db7202
commit
7f44a2ea6e
|
@ -398,7 +398,7 @@ class ControllerType(type):
|
|||
if inspect.isfunction(v):
|
||||
spec = inspect.getargspec(v)
|
||||
first_arg = spec.args[1] if len(spec.args) >= 2 else None
|
||||
if first_arg in ["req"]:
|
||||
if first_arg in ["req", "request"]:
|
||||
def build_new(nv):
|
||||
return lambda self, *args, **kwargs: nv(self, request, *args, **kwargs)
|
||||
cls._methods_wrapper[k] = build_new(v)
|
||||
|
|
Loading…
Reference in New Issue