[Fix] Update Node depth when adding new Edges to a Pathway (#384)

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#384
This commit is contained in:
2026-05-12 09:40:35 +12:00
parent a2fc9f72cb
commit b39fc7eaf8
4 changed files with 54 additions and 45 deletions

View File

@ -1967,6 +1967,9 @@ def add_pathway_edge(request, package_uuid, pathway_uuid, e: Form[CreateEdge]):
description=e.edgeReason,
)
# Update depths as sideeffect of above operation
pw.update_depths()
return redirect(new_e.url)
except ValueError:
return 403, {"message": "Adding Edge failed!"}