Skip to content

Commit 7c48a6c

Browse files
authored
fix: The data source tool cannot obtain the execution parameters (#4517)
1 parent 067cd73 commit 7c48a6c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

apps/application/flow/step_node/tool_lib_node/impl/base_tool_lib_node.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,16 +197,18 @@ def execute(self, tool_lib_id, input_field_list, **kwargs) -> NodeResult:
197197
else:
198198
all_params = init_params_default_value | params
199199
if self.node.properties.get('kind') == 'data-source':
200-
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'})
200+
exist = function_executor.exec_code(
201+
f'{tool_lib.code}\ndef function_exist(function_name): return callable(globals().get(function_name))',
202+
{'function_name': 'get_download_file_list'})
203+
all_params = {**all_params, **self.workflow_params.get('data_source')}
201204
if exist:
202205
download_file_list = []
203206
download_list = function_executor.exec_code(tool_lib.code,
204-
{**all_params, **self.workflow_params.get('data_source')},
207+
all_params,
205208
function_name='get_download_file_list')
206209
for item in download_list:
207210
result = function_executor.exec_code(tool_lib.code,
208-
{**all_params, **self.workflow_params.get('data_source'),
209-
'download_item': item},
211+
{**all_params, 'download_item': item},
210212
function_name='download')
211213
file_bytes = result.get('file_bytes', [])
212214
chunks = []

0 commit comments

Comments
 (0)