Skip to content

Commit

Permalink
fix: improve merge branch node ID checks in graph engine (#12128)
Browse files Browse the repository at this point in the history
Signed-off-by: -LAN- <[email protected]>
  • Loading branch information
laipz8200 authored Dec 26, 2024
1 parent a2855fa commit 26b5680
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/core/workflow/graph_engine/entities/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,10 @@ def _fetch_all_node_ids_in_parallels(
for (node_id, node_id2), branch_node_ids in duplicate_end_node_ids.items():
# check which node is after
if cls._is_node2_after_node1(node1_id=node_id, node2_id=node_id2, edge_mapping=edge_mapping):
if node_id in merge_branch_node_ids:
if node_id in merge_branch_node_ids and node_id2 in merge_branch_node_ids:
del merge_branch_node_ids[node_id2]
elif cls._is_node2_after_node1(node1_id=node_id2, node2_id=node_id, edge_mapping=edge_mapping):
if node_id2 in merge_branch_node_ids:
if node_id in merge_branch_node_ids and node_id2 in merge_branch_node_ids:
del merge_branch_node_ids[node_id]

branches_merge_node_ids: dict[str, str] = {}
Expand Down

0 comments on commit 26b5680

Please sign in to comment.