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),