Skip to content

Commit

Permalink
fix: Multiple Paths Between IF/ELSE Branches Invalidate Conditions an…
Browse files Browse the repository at this point in the history
…d Execute All Paths close #11542

Signed-off-by: yihong0618 <[email protected]>
  • Loading branch information
yihong0618 committed Dec 11, 2024
1 parent 42d986b commit 0027f78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ def _recursive_fetch_answer_dependencies(
reverse_edges = reverse_edge_mapping.get(current_node_id, [])
for edge in reverse_edges:
source_node_id = edge.source_node_id
if source_node_id not in node_id_config_mapping:
continue
source_node_type = node_id_config_mapping[source_node_id].get("data", {}).get("type")
if source_node_type in {
NodeType.ANSWER,
Expand Down
2 changes: 2 additions & 0 deletions api/core/workflow/nodes/end/end_stream_generate_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ def _recursive_fetch_end_dependencies(
reverse_edges = reverse_edge_mapping.get(current_node_id, [])
for edge in reverse_edges:
source_node_id = edge.source_node_id
if source_node_id not in node_id_config_mapping:
continue
source_node_type = node_id_config_mapping[source_node_id].get("data", {}).get("type")
if source_node_type in {
NodeType.IF_ELSE.value,
Expand Down

0 comments on commit 0027f78

Please sign in to comment.