fix(workflow): normalize output node type comparison and fix validator error message spacing

This commit is contained in:
Timebomb2018
2026-04-21 17:50:31 +08:00
parent 9533a9a693
commit 93d4607b14
2 changed files with 3 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ from app.core.workflow.nodes import NodeFactory
from app.core.workflow.nodes.enums import NodeType, BRANCH_NODES from app.core.workflow.nodes.enums import NodeType, BRANCH_NODES
from app.core.workflow.utils.expression_evaluator import evaluate_condition from app.core.workflow.utils.expression_evaluator import evaluate_condition
from app.core.workflow.validator import WorkflowValidator from app.core.workflow.validator import WorkflowValidator
from app.core.workflow.variable.base_variable import VariableType
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@@ -194,7 +195,7 @@ class GraphBuilder:
outputs_list = config.get("outputs", []) outputs_list = config.get("outputs", [])
output = "\n".join( output = "\n".join(
item.get("value", "") for item in outputs_list item.get("value", "") for item in outputs_list
if item.get("value") and item.get("type", "string") == "string" if item.get("value") and item.get("type", VariableType.STRING) == VariableType.STRING
) or None ) or None
else: else:
output = config.get("output") output = config.get("output")