Skip to content

Commit

Permalink
fix: hotfix to solve cookie issues
Browse files Browse the repository at this point in the history
  • Loading branch information
DeimerM committed Apr 11, 2024
1 parent 521618d commit 0fdfad3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openedx/core/djangoapps/lang_pref/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ def process_response(self, request, response): # lint-amnesty, pylint: disable=

# DarkLangMiddleware has already set this cookie
if DarkLangConfig.current().enabled and get_user_preference(current_user, DARK_LANGUAGE_KEY):
new_lang = get_user_preference(current_user, DARK_LANGUAGE_KEY)
lang_pref_helpers.set_language_cookie(request, response, new_lang)
return response

anonymous_cookie_lang = getattr(request, '_anonymous_user_cookie_lang', None)
Expand Down

0 comments on commit 0fdfad3

Please sign in to comment.