[IMP] cleanup initialization of evaluation context on eval_domain and eval_context

bzr revid: xmo@openerp.com-20110329082034-zh2gx656806bu2se
This commit is contained in:
Xavier Morel
2011-03-29 10:20:34 +02:00
parent 5e426a9c31
commit e549c9f7cb
+2 -6
View File
@@ -168,9 +168,7 @@ class OpenERPSession(object):
if isinstance(context_to_eval, dict):
return context_to_eval
ctx = {}
if context:
ctx.update(context)
ctx = context or {}
ctx['context'] = ctx
# if the domain was unpacked from JSON, it needs the current
@@ -226,9 +224,7 @@ class OpenERPSession(object):
if isinstance(domain, list):
return domain
ctx = {}
if context:
ctx.update(context)
ctx = context or {}
ctx['context'] = ctx
# if the domain was unpacked from JSON, it needs the current