diff --git a/api/core/workflow/nodes/document_extractor/document_extractor_node.py b/api/core/workflow/nodes/document_extractor/document_extractor_node.py index 7ed572c9ae..2f96215b33 100644 --- a/api/core/workflow/nodes/document_extractor/document_extractor_node.py +++ b/api/core/workflow/nodes/document_extractor/document_extractor_node.py @@ -41,7 +41,7 @@ class DocumentExtractorNode(BaseNode): if variable is None: error_message = f"File variable not found for selector: {variable_selector}" return NodeRunResult(status=WorkflowNodeExecutionStatus.FAILED, error=error_message) - if not isinstance(variable, ArrayFileSegment | FileSegment): + if variable.value and not isinstance(variable, ArrayFileSegment | FileSegment): error_message = f"Variable {variable_selector} is not an ArrayFileSegment" return NodeRunResult(status=WorkflowNodeExecutionStatus.FAILED, error=error_message)