瀏覽代碼

fix(code_node): type checking bypass

Signed-off-by: -LAN- <laipz8200@outlook.com>
tags/2.0.0-beta.1
-LAN- 1 月之前
父節點
當前提交
aff7ca12b8
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 4 行新增1 行删除
  1. 4
    1
      api/core/workflow/nodes/code/code_node.py

+ 4
- 1
api/core/workflow/nodes/code/code_node.py 查看文件

@@ -265,8 +265,11 @@ class CodeNode(Node):

elif output_config.type == SegmentType.STRING:
# check if string available
value = result.get("output_name")
if value is not None and not isinstance(value, str):
raise OutputValidationError(f"Output value `{value}` is not string")
transformed_result[output_name] = self._check_string(
value=result[output_name],
value=value,
variable=f"{prefix}{dot}{output_name}",
)
elif output_config.type == SegmentType.BOOLEAN:

Loading…
取消
儲存