From 9f20d23a07320ccc48a041f39571e9ccaaec738f Mon Sep 17 00:00:00 2001 From: Kumi Date: Sat, 8 Jul 2023 16:42:29 +0200 Subject: [PATCH] Don't fail if AppSession is not set --- authentication/views/reverify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authentication/views/reverify.py b/authentication/views/reverify.py index 1d7c800..634f497 100644 --- a/authentication/views/reverify.py +++ b/authentication/views/reverify.py @@ -23,7 +23,7 @@ class ReverifyView(TitleMixin, LoginView): app_session = AppSession.objects.get(id=self.request.session["AppSession"]) app_session.used = True app_session.save() - except AppSession.DoesNotExist: + except (AppSession.DoesNotExist, KeyError): pass return HttpResponseRedirect(self.get_success_url()) \ No newline at end of file