From 573d694e36dfa56d334b2f7a4b393dead19e4a65 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Wed, 25 Dec 2024 10:52:32 +0800 Subject: [PATCH] fix: Empty knowledge base upload error --- apps/dataset/serializers/document_serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dataset/serializers/document_serializers.py b/apps/dataset/serializers/document_serializers.py index c275e38f34c..856ee5f702b 100644 --- a/apps/dataset/serializers/document_serializers.py +++ b/apps/dataset/serializers/document_serializers.py @@ -1046,7 +1046,7 @@ def batch_save(self, instance_list: List[Dict], with_valid=True): # 查询文档 query_set = QuerySet(model=Document) if len(document_model_list) == 0: - return [], + return [], dataset_id query_set = query_set.filter(**{'id__in': [d.id for d in document_model_list]}) return native_search(query_set, select_string=get_file_content( os.path.join(PROJECT_DIR, "apps", "dataset", 'sql', 'list_document.sql')),