Skip to content

Commit

Permalink
fix_graph
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielTollenaar committed Dec 12, 2024
1 parent 2e4fc0f commit 75a43ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ribasim_nl/ribasim_nl/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ def merge_basins(
)

if are_connected and (to_node_type != "FlowBoundary"):
paths = [i for i in nx.all_shortest_paths(self.graph, node_id, to_node_id) if len(i) == 3]
paths = [i for i in nx.all_shortest_paths(nx.Graph(self.graph), node_id, to_node_id) if len(i) == 3]

if len(paths) == 0:
raise ValueError(f"basin {node_id} not a direct neighbor of basin {to_node_id}")
Expand Down

0 comments on commit 75a43ba

Please sign in to comment.