From fbf9554a9ee78ad913c21b63e14131bcd3c73f24 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 14 Jul 2020 21:42:47 +0200 Subject: [PATCH] flows: fix SESSION_KEY_GET being deleted too early --- passbook/flows/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/passbook/flows/views.py b/passbook/flows/views.py index 856da2b7b..158c529fc 100644 --- a/passbook/flows/views.py +++ b/passbook/flows/views.py @@ -152,11 +152,12 @@ class FlowExecutorView(View): def _flow_done(self) -> HttpResponse: """User Successfully passed all stages""" - self.cancel() # Since this is wrapped by the ExecutorShell, the next argument is saved in the session + # extract the next param before cancel as that cleans it next_param = self.request.session.get(SESSION_KEY_GET, {}).get( NEXT_ARG_NAME, "passbook_core:overview" ) + self.cancel() return redirect_with_qs(next_param) def stage_ok(self) -> HttpResponse: