From c73223fefb62208e61e8ba2cb3bfbc683f952010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 3 Nov 2008 10:56:53 +0100 Subject: [PATCH] Reset CONTEXT after call user.get_preferences to not lost context if there is a error in the call --- tryton/rpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton/rpc.py b/tryton/rpc.py index 841642c432..180072e859 100644 --- a/tryton/rpc.py +++ b/tryton/rpc.py @@ -137,12 +137,12 @@ def logout(): def context_reload(): global CONTEXT, TIMEZONE - CONTEXT = {} user = RPCProxy('res.user') try: context = user.get_preferences(True, {}) except: return + CONTEXT = {} for i in context: value = context[i] CONTEXT[i] = value