diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2022-03-24 12:25:32 +0100 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2022-03-24 12:25:56 +0100 |
commit | f1fd732e742b8b1530bf95b8df05d69dfe8c1eb0 (patch) | |
tree | e670c387ce2973017bb6bf937341e14e5256dd32 /accounts/views.py | |
parent | correct version number (diff) | |
download | scout-subs-f1fd732e742b8b1530bf95b8df05d69dfe8c1eb0.tar.gz scout-subs-f1fd732e742b8b1530bf95b8df05d69dfe8c1eb0.zip |
move all items in dropdown
Diffstat (limited to '')
-rw-r--r-- | accounts/views.py | 5 |
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 |