[FIX] http: use default language when lang not in context

This commit is contained in:
David Monjoie 2014-11-13 09:51:25 +01:00 committed by Christophe Simonis
parent 5f41325271
commit fd92f16801
1 changed files with 2 additions and 1 deletions

View File

@ -207,6 +207,7 @@ class WebRequest(object):
@lazy_property
def lang(self):
self.session._fix_lang(self.context)
return self.context["lang"]
@lazy_property
@ -957,7 +958,7 @@ class OpenERPSession(werkzeug.contrib.sessions.Session):
:param dict context: context to fix
"""
lang = context['lang']
lang = context.get('lang')
# inane OpenERP locale
if lang == 'ar_AR':