core: fix error getting stages when enrollment flow isn't set
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
426686957d
commit
79044368d2
|
@ -183,6 +183,8 @@ class SourceFlowManager:
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
def get_stages_to_append(self, flow: Flow) -> list[Stage]:
|
def get_stages_to_append(self, flow: Flow) -> list[Stage]:
|
||||||
"""Hook to override stages which are appended to the flow"""
|
"""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:
|
if flow.slug == self.source.enrollment_flow.slug:
|
||||||
return [
|
return [
|
||||||
in_memory_stage(PostUserEnrollmentStage),
|
in_memory_stage(PostUserEnrollmentStage),
|
||||||
|
|
Reference in a new issue