From 3d52266773549d61a24993bd8ee15884413e89d6 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 19 May 2022 20:31:28 +0200 Subject: [PATCH] flows: handle missing `initial_data` in challenge AUTHENTIK-1HK Signed-off-by: Jens Langhammer --- authentik/flows/stage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/authentik/flows/stage.py b/authentik/flows/stage.py index 06dc8e194..5a4e24bcc 100644 --- a/authentik/flows/stage.py +++ b/authentik/flows/stage.py @@ -138,6 +138,8 @@ class ChallengeStageView(StageView): op="authentik.flow.stage._get_challenge", description=self.__class__.__name__, ): + if not hasattr(challenge, "initial_data"): + challenge.initial_data = {} if "flow_info" not in challenge.initial_data: flow_info = ContextualFlowInfo( data={