flows: fix flow diagram showing policy after stage and not before
This commit is contained in:
parent
30a1b65e94
commit
9b3e94c7c8
|
@ -107,13 +107,6 @@ class FlowViewSet(ModelViewSet):
|
|||
.filter(target=flow)
|
||||
.order_by("order")
|
||||
):
|
||||
body.append(
|
||||
DiagramElement(
|
||||
f"stage_{s_index}",
|
||||
"operation",
|
||||
f"Stage\n{stage_binding.stage.name}",
|
||||
)
|
||||
)
|
||||
for p_index, policy_binding in enumerate(
|
||||
get_objects_for_user(
|
||||
request.user, "authentik_policies.view_policybinding"
|
||||
|
@ -128,6 +121,13 @@ class FlowViewSet(ModelViewSet):
|
|||
f"Policy\n{policy_binding.policy.name}",
|
||||
)
|
||||
)
|
||||
body.append(
|
||||
DiagramElement(
|
||||
f"stage_{s_index}",
|
||||
"operation",
|
||||
f"Stage\n{stage_binding.stage.name}",
|
||||
)
|
||||
)
|
||||
# If the 2nd last element is a policy, we need to have an item to point to
|
||||
# for a negative case
|
||||
body.append(
|
||||
|
|
Reference in a new issue