Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix: update iteration node to use correct variable segment types (#25315)
-LAN-7e629fd783bd
diff --git a/api/core/workflow/nodes/iteration/iteration_node.py b/api/core/workflow/nodes/iteration/iteration_node.pyindex 9037677df91..52eb7fdd75b 100644--- a/api/core/workflow/nodes/iteration/iteration_node.py+++ b/api/core/workflow/nodes/iteration/iteration_node.py@@ -11,7 +11,7 @@ from typing import TYPE_CHECKING, Any, Optional, castfrom flask import Flask, current_appfrom configs import dify_config-from core.variables import ArrayVariable, IntegerVariable, NoneVariable+from core.variables import IntegerVariable, NoneSegmentfrom core.variables.segments import ArrayAnySegment, ArraySegmentfrom core.workflow.entities.node_entities import (NodeRunResult,@@ -112,10 +112,10 @@ class IterationNode(BaseNode):if not variable:raise IteratorVariableNotFoundError(f"iterator variable {self._node_data.iterator_selector} not found")- if not isinstance(variable, ArrayVariable) and not isinstance(variable, NoneVariable):+ if not isinstance(variable, ArraySegment) and not isinstance(variable, NoneSegment):raise InvalidIteratorValueError(f"invalid iterator value: {variable}, please provide a list.")- if isinstance(variable, NoneVariable) or len(variable.value) == 0:+ if isinstance(variable, NoneSegment) or len(variable.value) == 0:# Try our best to preserve the type informat.if isinstance(variable, ArraySegment):output = variable.model_copy(update={"value": []})