aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/views.py
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2022-03-24 12:25:32 +0100
committerAndrea Lepori <alepori@student.ethz.ch>2022-03-24 12:25:56 +0100
commitf1fd732e742b8b1530bf95b8df05d69dfe8c1eb0 (patch)
treee670c387ce2973017bb6bf937341e14e5256dd32 /accounts/views.py
parentcorrect version number (diff)
downloadscout-subs-f1fd732e742b8b1530bf95b8df05d69dfe8c1eb0.tar.gz
scout-subs-f1fd732e742b8b1530bf95b8df05d69dfe8c1eb0.zip
move all items in dropdown
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