mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
fix(api/core/workflow/nodes/iteration/iteration_node.py): Extend output in iteration if output is a array. (#6647)
Signed-off-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
parent
fb5e3662d5
commit
4ec9a87e46
|
@ -106,6 +106,10 @@ class IterationNode(BaseIterationNode):
|
||||||
variable_pool.remove([self.node_id] + output_selector[1:])
|
variable_pool.remove([self.node_id] + output_selector[1:])
|
||||||
state.current_output = output
|
state.current_output = output
|
||||||
if output is not None:
|
if output is not None:
|
||||||
|
# NOTE: This is a temporary patch to process double nested list (for example, DALL-E output in iteration).
|
||||||
|
if isinstance(output, list):
|
||||||
|
state.outputs.extend(output)
|
||||||
|
else:
|
||||||
state.outputs.append(output)
|
state.outputs.append(output)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
Loading…
Reference in New Issue
Block a user