From 5a84908ffa4cd7b8fc80f3a485e26ab458fdff9c Mon Sep 17 00:00:00 2001 From: Rydal <62206239+RydalWater@users.noreply.github.com> Date: Fri, 4 Oct 2024 09:24:00 +0100 Subject: [PATCH] Bugfix (library card) Fixed issue with clearing cache/flushing session data on library card. --- openlibrarian_root/library_card/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlibrarian_root/library_card/views.py b/openlibrarian_root/library_card/views.py index e5ac90c..e4cab89 100644 --- a/openlibrarian_root/library_card/views.py +++ b/openlibrarian_root/library_card/views.py @@ -87,7 +87,7 @@ async def library_card(request, npub: str=None): if "explore" in request.POST: # First log out of session and clear cache (including nsec) - request.session.clear() + request.session.flush() cache.clear() # Then log-in via npub @@ -105,6 +105,6 @@ async def library_card(request, npub: str=None): # Clear session and head back to create and account if "new" in request.POST: # First make sure logged out of session and clear cache (including nsec) - request.session.clear() + request.session.flush() cache.clear() return redirect('circulation_desk:create-account')