mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-10 21:49:00 +08:00
Fix:Update chat assistant with an empty dataset (#7354)
### What problem does this PR solve? When updating a chat assistant using API,if the dataset attached by the current chat assistant is not empty,setting dataset to null("dataset_ids":[]) will cause update failure:'dataset_ids' can't be empty ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
af393b0003
commit
53c59c47a1
@ -165,10 +165,7 @@ def update(tenant_id, chat_id):
|
||||
ids = req.get("dataset_ids")
|
||||
if "show_quotation" in req:
|
||||
req["do_refer"] = req.pop("show_quotation")
|
||||
if "dataset_ids" in req:
|
||||
if not ids:
|
||||
return get_error_data_result("`dataset_ids` can't be empty")
|
||||
if ids:
|
||||
if ids is not None:
|
||||
for kb_id in ids:
|
||||
kbs = KnowledgebaseService.accessible(kb_id=kb_id, user_id=tenant_id)
|
||||
if not kbs:
|
||||
|
Loading…
x
Reference in New Issue
Block a user