Reset CONTEXT after call user.get_preferences to not lost context if there is

a error in the call
This commit is contained in:
Cédric Krier
2008-11-03 10:56:53 +01:00
parent fd334ba8cc
commit c73223fefb
+1 -1
View File
@@ -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