From 0fdfad3834925bb22178f2e5930fe7ce07728507 Mon Sep 17 00:00:00 2001 From: Deimer M Date: Thu, 11 Apr 2024 17:52:51 -0500 Subject: [PATCH] fix: hotfix to solve cookie issues --- openedx/core/djangoapps/lang_pref/middleware.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openedx/core/djangoapps/lang_pref/middleware.py b/openedx/core/djangoapps/lang_pref/middleware.py index d0a787c5daa..a480c2577ed 100644 --- a/openedx/core/djangoapps/lang_pref/middleware.py +++ b/openedx/core/djangoapps/lang_pref/middleware.py @@ -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)