[Fix] Propagate multi_step in Edge.create to Reaction.create to ensure deduplication is working (#405)

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#405
This commit is contained in:
2026-05-29 07:39:32 +12:00
parent 20fd949dfd
commit be5ee1d1d7
2 changed files with 31 additions and 6 deletions

View File

@ -2458,6 +2458,8 @@ class Edge(EnviPathModel, AliasMixin, ScenarioMixin, AdditionalInformationMixin)
rule: Optional[Rule] = None,
name: Optional[str] = None,
description: Optional[str] = None,
*args,
**kwargs,
):
e = Edge()
e.pathway = pathway
@ -2487,7 +2489,7 @@ class Edge(EnviPathModel, AliasMixin, ScenarioMixin, AdditionalInformationMixin)
educts=[n.default_node_label for n in e.start_nodes.all()],
products=[n.default_node_label for n in e.end_nodes.all()],
rules=rule,
multi_step=False,
multi_step=kwargs.get("multi_step", False),
)
e.edge_label = r