diff --git a/authentik/flows/api/flows_diagram.py b/authentik/flows/api/flows_diagram.py index 1ce68439b..5ac3f7b07 100644 --- a/authentik/flows/api/flows_diagram.py +++ b/authentik/flows/api/flows_diagram.py @@ -185,7 +185,7 @@ class FlowDiagram: flow_element = DiagramElement( "flow_start", _("Flow") + "\n" + self.flow.name, - "", + "" if len(flow_policies) > 0 else None, source=flow_policies, style=["[[", "]]"], ) diff --git a/authentik/flows/tests/test_api.py b/authentik/flows/tests/test_api.py index 0bca3c8e3..3de7dd3f0 100644 --- a/authentik/flows/tests/test_api.py +++ b/authentik/flows/tests/test_api.py @@ -10,7 +10,7 @@ from authentik.policies.models import PolicyBinding from authentik.stages.dummy.models import DummyStage DIAGRAM_EXPECTED = """graph TD ---> flow_start[["Flow +flow_start[["Flow test-default-context"]] --> stage_0(["Stage (Dummy Stage) dummy1"]) @@ -20,7 +20,7 @@ stage_0 --> stage_1_policy_0{{"Policy (Dummy Policy) dummy2-policy"}} stage_1 --> done[["End of the flow"]]""" DIAGRAM_SHORT_EXPECTED = """graph TD ---> flow_start[["Flow +flow_start[["Flow test-default-context"]] flow_start --> done[["End of the flow"]]"""