Skip to content
Snippets Groups Projects
Commit bdde46da authored by Wolfgang Taferner's avatar Wolfgang Taferner
Browse files

[FIX] http_routing: mitigate key does not exist in context for lang


closes odoo/odoo#83880

Signed-off-by: default avatarOlivier Dony <odo@odoo.com>
parent 6bceae94
Branches
Tags
No related merge requests found
......@@ -402,7 +402,7 @@ class IrHttp(models.AbstractModel):
if nearest_lang:
lang = Lang._lang_get(nearest_lang)
else:
nearest_ctx_lg = not is_a_bot and cls.get_nearest_lang(request.env.context['lang'])
nearest_ctx_lg = not is_a_bot and cls.get_nearest_lang(request.env.context.get('lang'))
nearest_ctx_lg = nearest_ctx_lg in lang_codes and nearest_ctx_lg
preferred_lang = Lang._lang_get(cook_lang or nearest_ctx_lg)
lang = preferred_lang or cls._get_default_lang()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment