Skip to content

Commit 7aa13a4

Browse files
committed
fix: remove unused fetch_list_function logic in KnowledgeWorkflowSerializer
1 parent 0535e7b commit 7aa13a4

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

apps/knowledge/views/knowledge_workflow.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,7 @@ def post(self, request: Request, workspace_id: str, knowledge_id: str, type: str
3535
r = KnowledgeWorkflowSerializer.Datasource(
3636
data={'type': type, 'id': id, 'params': request.data, 'function_name': 'get_form_list'}
3737
).action()
38-
for item in r:
39-
attrs = item.get('attrs')
40-
if attrs:
41-
function = attrs.pop('fetch_list_function', None)
42-
if function and callable(function):
43-
function_name = function.__name__
44-
else:
45-
function_name = function
46-
attrs[
47-
'url'] = '/workspace/${current_workspace_id}/knowledge/${current_knowledge_id}/datasource/tool/' + f'{id}/{function_name}'
38+
4839
return result.success(r)
4940

5041

0 commit comments

Comments
 (0)