Skip to content

Commit

Permalink
fix: Empty knowledge base upload error (#1904)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaohuzhang1 authored Dec 25, 2024
1 parent 0cae0c8 commit 2db8616
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/dataset/serializers/document_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')),
Expand Down

0 comments on commit 2db8616

Please sign in to comment.