mirror of
https://gitee.com/fit2cloud-feizhiyun/MaxKB.git
synced 2025-12-06 11:19:08 +08:00
fix: remove unused fetch_list_function logic in KnowledgeWorkflowSerializer
This commit is contained in:
@@ -35,16 +35,7 @@ class KnowledgeDatasourceFormListView(APIView):
|
||||
r = KnowledgeWorkflowSerializer.Datasource(
|
||||
data={'type': type, 'id': id, 'params': request.data, 'function_name': 'get_form_list'}
|
||||
).action()
|
||||
for item in r:
|
||||
attrs = item.get('attrs')
|
||||
if attrs:
|
||||
function = attrs.pop('fetch_list_function', None)
|
||||
if function and callable(function):
|
||||
function_name = function.__name__
|
||||
else:
|
||||
function_name = function
|
||||
attrs[
|
||||
'url'] = '/workspace/${current_workspace_id}/knowledge/${current_knowledge_id}/datasource/tool/' + f'{id}/{function_name}'
|
||||
|
||||
return result.success(r)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user