[FIX] service: wrapper: fixed context fetching. Indeed call_kw set its context
in kwargs of kwargs, leading to a kwargception. bzr revid: tde@openerp.com-20140507110637-qlj1rj8lrcpkejf6
This commit is contained in:
parent
b882dd7109
commit
0f9917c9a3
|
@ -54,7 +54,8 @@ def check(f):
|
|||
if args and isinstance(args[-1], dict):
|
||||
ctx = args[-1]
|
||||
elif isinstance(kwargs, dict):
|
||||
ctx = kwargs.get('context', {})
|
||||
# kwargception because call_kw set its context in kwargs['kwargs']
|
||||
ctx = kwargs.get('context', kwargs.get('kwargs', {}).get('context', {}))
|
||||
|
||||
uid = 1
|
||||
if args and isinstance(args[0], (long, int)):
|
||||
|
|
Loading…
Reference in New Issue