mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fixed the bug that passing an empty array will not update (#10755)
### What problem does this PR solve? Fixed the bug that the "dataset_ids" field will not be updated if an empty array is passed when updating the assistant ### Type of change - [*] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -169,6 +169,8 @@ def update(tenant_id, chat_id):
|
|||||||
if len(embd_count) > 1:
|
if len(embd_count) > 1:
|
||||||
return get_result(message='Datasets use different embedding models."', code=settings.RetCode.AUTHENTICATION_ERROR)
|
return get_result(message='Datasets use different embedding models."', code=settings.RetCode.AUTHENTICATION_ERROR)
|
||||||
req["kb_ids"] = ids
|
req["kb_ids"] = ids
|
||||||
|
else:
|
||||||
|
req["kb_ids"] = []
|
||||||
llm = req.get("llm")
|
llm = req.get("llm")
|
||||||
if llm:
|
if llm:
|
||||||
if "model_name" in llm:
|
if "model_name" in llm:
|
||||||
|
|||||||
Reference in New Issue
Block a user