From 36804cc6e2af892f45060e29acab26edaeed2b1e Mon Sep 17 00:00:00 2001 From: Nelson Moore Date: Tue, 29 Aug 2023 10:41:37 -0400 Subject: [PATCH] bugfix: update make_model_changelog.py edges Add nanoid to Edge entities in make_model_changlog.py script to prevent duplicate relationships from edges with identical handles to src/dst Nodes --- python/scripts/make_model_changelog.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/scripts/make_model_changelog.py b/python/scripts/make_model_changelog.py index 8d59af3..c51ad04 100644 --- a/python/scripts/make_model_changelog.py +++ b/python/scripts/make_model_changelog.py @@ -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)