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: if-else-node handles missing optional file variables (#15693)
Arcaner12fa517297a1
diff --git a/api/core/workflow/entities/variable_pool.py b/api/core/workflow/entities/variable_pool.pyindex 844b46f3528..a0318083606 100644--- a/api/core/workflow/entities/variable_pool.py+++ b/api/core/workflow/entities/variable_pool.py@@ -7,7 +7,7 @@ from pydantic import BaseModel, Fieldfrom core.file import File, FileAttribute, file_managerfrom core.variables import Segment, SegmentGroup, Variable-from core.variables.segments import FileSegment+from core.variables.segments import FileSegment, NoneSegmentfrom factories import variable_factoryfrom ..constants import CONVERSATION_VARIABLE_NODE_ID, ENVIRONMENT_VARIABLE_NODE_ID, SYSTEM_VARIABLE_NODE_ID@@ -131,11 +131,13 @@ class VariablePool(BaseModel):if attr not in {item.value for item in FileAttribute}:return Nonevalue = self.get(selector)- if not isinstance(value, FileSegment):+ if not isinstance(value, (FileSegment, NoneSegment)):return None- attr = FileAttribute(attr)- attr_value = file_manager.get_attr(file=value.value, attr=attr)- return variable_factory.build_segment(attr_value)+ if isinstance(value, FileSegment):+ attr = FileAttribute(attr)+ attr_value = file_manager.get_attr(file=value.value, attr=attr)+ return variable_factory.build_segment(attr_value)+ return valuereturn value