Don't use check_for_language in the user settings form

That function is buggy and can't handle the Chinese language codes.

Closes-Bug: #1818639
Change-Id: I6ea03949f3ad6db82f5965de3fa028a84edf6cf3
This commit is contained in:
Radomir Dopieralski 2019-03-05 16:43:06 +01:00
parent 01ee3a0741
commit 6372a689e2

View File

@ -103,9 +103,8 @@ class UserSettingsForm(forms.SelfHandlingForm):
response = shortcuts.redirect(request.build_absolute_uri())
lang_code = data['language']
if lang_code and translation.check_for_language(lang_code):
response = functions.save_config_value(
request, response, settings.LANGUAGE_COOKIE_NAME, lang_code)
response = functions.save_config_value(
request, response, settings.LANGUAGE_COOKIE_NAME, lang_code)
response = functions.save_config_value(
request, response, 'django_timezone',