From 13d975a25830cca23d28e032288caf8ae5934e78 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 20 Oct 2022 19:30:56 +0200 Subject: [PATCH] flows: fix error when opening inspector with no history Signed-off-by: Jens Langhammer --- authentik/flows/views/inspector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authentik/flows/views/inspector.py b/authentik/flows/views/inspector.py index edf40a23d..6ceedc05b 100644 --- a/authentik/flows/views/inspector.py +++ b/authentik/flows/views/inspector.py @@ -105,7 +105,7 @@ class FlowInspectorView(APIView): current_plan: FlowPlan = request.session[SESSION_KEY_PLAN] else: try: - current_plan = request.session[SESSION_KEY_HISTORY][-1] + current_plan = request.session.get(SESSION_KEY_HISTORY, [])[-1] except IndexError: return Response(status=400) is_completed = True