fix: correct type checking for None values in code node output validation

- Fixed isinstance() checks to properly handle None values by checking None separately
- Fixed typo in STRING type validation where 'output_name' was hardcoded as string instead of variable
- Updated error message format to be consistent and more informative
- Updated test assertion to match new error message format
This commit is contained in:
-LAN-
2025-09-04 20:39:37 +08:00
parent 9c2943183e
commit 81e9d6f63a
2 changed files with 7 additions and 5 deletions

View File

@ -162,7 +162,7 @@ def test_execute_code_output_validator(setup_code_executor_mock):
result = node._run()
assert isinstance(result, NodeRunResult)
assert result.status == WorkflowNodeExecutionStatus.FAILED
assert result.error == "Output variable `result` must be a string"
assert result.error == "Output result must be a string, got int instead"
def test_execute_code_output_validator_depth():