Skip to content

Commit

Permalink
bugfix: update make_model_changelog.py edges
Browse files Browse the repository at this point in the history
Add nanoid to Edge entities in make_model_changlog.py script to prevent duplicate relationships from edges with identical handles to src/dst Nodes
  • Loading branch information
nelsonwmoore committed Aug 29, 2023
1 parent 699b46c commit 36804cc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/scripts/make_model_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ def process_model_nodes(model: Model, cypher_stmts) -> None:
def process_model_edges(model: Model, cypher_stmts) -> None:
"""Generates cypher statements to create/merge an model's edges."""
for edge in model.edges.values():
edge.nanoid = make_nanoid()
generate_cypher_to_add_entity(edge, cypher_stmts)
generate_cypher_to_add_relationship(edge, "has_src", edge.src, cypher_stmts)
generate_cypher_to_add_relationship(edge, "has_dst", edge.dst, cypher_stmts)
Expand Down

0 comments on commit 36804cc

Please sign in to comment.