From e549c9f7cb98488e7fd0a6acd413901d80b3be11 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 29 Mar 2011 10:20:34 +0200 Subject: [PATCH] [IMP] cleanup initialization of evaluation context on eval_domain and eval_context bzr revid: xmo@openerp.com-20110329082034-zh2gx656806bu2se --- openerpweb/openerpweb.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/openerpweb/openerpweb.py b/openerpweb/openerpweb.py index 1c3183bc394..fb200d23217 100644 --- a/openerpweb/openerpweb.py +++ b/openerpweb/openerpweb.py @@ -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