From df7555d8e26a0827b094481ec665783b553d8913 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Mon, 15 Dec 2025 18:20:47 +0800 Subject: [PATCH] fix: The data source tool cannot obtain the execution parameters --- .../step_node/tool_lib_node/impl/base_tool_lib_node.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/application/flow/step_node/tool_lib_node/impl/base_tool_lib_node.py b/apps/application/flow/step_node/tool_lib_node/impl/base_tool_lib_node.py index 67941666b05..61f35f58c07 100644 --- a/apps/application/flow/step_node/tool_lib_node/impl/base_tool_lib_node.py +++ b/apps/application/flow/step_node/tool_lib_node/impl/base_tool_lib_node.py @@ -197,16 +197,18 @@ def execute(self, tool_lib_id, input_field_list, **kwargs) -> NodeResult: else: all_params = init_params_default_value | params if self.node.properties.get('kind') == 'data-source': - exist = function_executor.exec_code(f'{tool_lib.code}\ndef function_exist(function_name): return callable(globals().get(function_name))', {'function_name': 'get_download_file_list'}) + exist = function_executor.exec_code( + f'{tool_lib.code}\ndef function_exist(function_name): return callable(globals().get(function_name))', + {'function_name': 'get_download_file_list'}) + all_params = {**all_params, **self.workflow_params.get('data_source')} if exist: download_file_list = [] download_list = function_executor.exec_code(tool_lib.code, - {**all_params, **self.workflow_params.get('data_source')}, + all_params, function_name='get_download_file_list') for item in download_list: result = function_executor.exec_code(tool_lib.code, - {**all_params, **self.workflow_params.get('data_source'), - 'download_item': item}, + {**all_params, 'download_item': item}, function_name='download') file_bytes = result.get('file_bytes', []) chunks = []