fix: iteration invalid output selector doesn't throw an error (#10544)

This commit is contained in:
Novice 2024-11-11 17:34:48 +08:00 committed by GitHub
parent a1543b7da0
commit 4b45ef62ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -489,7 +489,10 @@ class IterationNode(BaseNode[IterationNodeData]):
) )
yield metadata_event yield metadata_event
current_iteration_output = variable_pool.get(self.node_data.output_selector).value current_output_segment = variable_pool.get(self.node_data.output_selector)
if current_output_segment is None:
raise IterationNodeError("iteration output selector not found")
current_iteration_output = current_output_segment.value
outputs[current_index] = current_iteration_output outputs[current_index] = current_iteration_output
# remove all nodes outputs from variable pool # remove all nodes outputs from variable pool
for node_id in iteration_graph.node_ids: for node_id in iteration_graph.node_ids: