Skip to content

Commit

Permalink
Release 5.9.5
Browse files Browse the repository at this point in the history
### Changelog:
* HotFix(backend): Set lang cookie only if it changed.
  • Loading branch information
onegreyonewhite committed Jun 1, 2024
1 parent 9f3b092 commit 4cd6b57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vstutils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# pylint: disable=django-not-available
__version__: str = '5.9.4'
__version__: str = '5.9.5'
2 changes: 1 addition & 1 deletion vstutils/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def get_lang_object(self, request):
set_cookie = True
if 'lang' in request.GET:
code = request.GET['lang']
set_cookie = request.COOKIES.get('settings.LANGUAGE_COOKIE_NAME') != code
set_cookie = request.COOKIES.get(settings.LANGUAGE_COOKIE_NAME) != code
elif settings.LANGUAGE_COOKIE_NAME in request.COOKIES:
code = request.COOKIES[settings.LANGUAGE_COOKIE_NAME]
set_cookie = False
Expand Down

0 comments on commit 4cd6b57

Please sign in to comment.