Skip to content

Commit

Permalink
fix(workflow): fix answer node stream processing in conditional branches
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin9703 committed Jan 9, 2025
1 parent e74d523 commit 6dfc1cc
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions api/core/workflow/nodes/answer/base_stream_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,8 @@ def _remove_unreachable_nodes(self, event: NodeRunSucceededEvent | NodeRunExcept
and edge.run_condition.branch_identify
and run_result.edge_source_handle == edge.run_condition.branch_identify
):
# remove unreachable nodes
# FIXME: because of the code branch can combine directly, so for answer node
# we remove the node maybe shortcut the answer node, so comment this code for now
# there is not effect on the answer node and the workflow, when we have a better solution
# we can open this code. Issues: #11542 #9560 #10638 #10564
ids = self._fetch_node_ids_in_reachable_branch(edge.target_node_id, run_result.edge_source_handle)
if "answer" in ids:
continue
else:
reachable_node_ids.extend(ids)
reachable_node_ids.extend(ids)
else:
unreachable_first_node_ids.append(edge.target_node_id)

Expand Down

0 comments on commit 6dfc1cc

Please sign in to comment.