From 79044368d218cf04c8e3c2d60765e4fb640deb9c Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 16 Jun 2021 22:45:42 +0200 Subject: [PATCH] core: fix error getting stages when enrollment flow isn't set Signed-off-by: Jens Langhammer --- authentik/core/sources/flow_manager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/authentik/core/sources/flow_manager.py b/authentik/core/sources/flow_manager.py index d871d03e6..173064822 100644 --- a/authentik/core/sources/flow_manager.py +++ b/authentik/core/sources/flow_manager.py @@ -183,6 +183,8 @@ class SourceFlowManager: # pylint: disable=unused-argument def get_stages_to_append(self, flow: Flow) -> list[Stage]: """Hook to override stages which are appended to the flow""" + if not self.source.enrollment_flow: + return [] if flow.slug == self.source.enrollment_flow.slug: return [ in_memory_stage(PostUserEnrollmentStage),