flows: handle missing `initial_data` in challenge

AUTHENTIK-1HK

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-05-19 20:31:28 +02:00
parent 7bdecd2ee6
commit 3d52266773
1 changed files with 2 additions and 0 deletions

View File

@ -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={