locale: Don't remove language preference on logout

When a logged-in user is logs out, keep the language preference of the user who
was just logged in. This is Django behavior, don't overwrite it.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2018-02-16 12:27:18 +05:30 committed by James Valleroy
parent 90932e78af
commit cfec96a9c7
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -111,11 +111,6 @@ class SSOLogoutView(LogoutView):
def dispatch(self, request, *args, **kwargs):
response = super(SSOLogoutView, self).dispatch(request, *args,
**kwargs)
try:
del request.session[translation.LANGUAGE_SESSION_KEY]
except KeyError:
pass
response.delete_cookie(SSO_COOKIE_NAME)
return response