aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/views.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--accounts/views.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/accounts/views.py b/accounts/views.py
index 9f7c9b3..67e8911 100644
--- a/accounts/views.py
+++ b/accounts/views.py
@@ -272,14 +272,15 @@ def user_switcher(request):
sessions = json.loads(request.COOKIES.get("user_switcher"))
sessions[request.user.username] = (request.session.session_key, request.session.get_expiry_date().timestamp())
- set_switch_cookie(response, sessions)
if username in sessions:
set_session_cookie(response, sessions[username][0], sessions[username][1])
+ del sessions[username]
else:
set_session_cookie(response, "", 0)
- print("done")
+ set_switch_cookie(response, sessions)
+
return response