mirror of
https://github.com/langgenius/dify.git
synced 2026-05-01 16:08:04 +08:00
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:
@ -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():
|
||||
|
||||
Reference in New Issue
Block a user