mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 07:39:03 +08:00
Fix: empty doc id validation. (#6064)
### What problem does this PR solve? #6031 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
c00def5b71
commit
7463241896
@ -363,6 +363,10 @@ def download(tenant_id, dataset_id, document_id):
|
||||
schema:
|
||||
type: object
|
||||
"""
|
||||
if not document_id:
|
||||
return get_error_data_result(
|
||||
message="Specify document_id please."
|
||||
)
|
||||
if not KnowledgebaseService.query(id=dataset_id, tenant_id=tenant_id):
|
||||
return get_error_data_result(message=f"You do not own the dataset {dataset_id}.")
|
||||
doc = DocumentService.query(kb_id=dataset_id, id=document_id)
|
||||
|
@ -105,9 +105,10 @@ def init_llm_factory():
|
||||
|
||||
factory_llm_infos = settings.FACTORY_LLM_INFOS
|
||||
for factory_llm_info in factory_llm_infos:
|
||||
llm_infos = factory_llm_info.pop("llm")
|
||||
info = deepcopy(factory_llm_info)
|
||||
llm_infos = info.pop("llm")
|
||||
try:
|
||||
LLMFactoriesService.save(**factory_llm_info)
|
||||
LLMFactoriesService.save(**info)
|
||||
except Exception:
|
||||
pass
|
||||
LLMService.filter_delete([LLM.fid == factory_llm_info["name"]])
|
||||
|
Loading…
x
Reference in New Issue
Block a user