Fix the bug that prevented modifying dataset_ids (#3784)

### What problem does this PR solve?

Fix the bug that prevented modifying `dataset_ids`.
 #3772

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Co-authored-by: liuhua <10215101452@stu.ecun.edu.cn>
This commit is contained in:
liuhua 2024-12-02 11:40:20 +08:00 committed by GitHub
parent 7058ac0041
commit 3ee9ca749d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -161,7 +161,7 @@ def update(tenant_id,chat_id):
return get_error_data_result("`datasets` can't be empty") return get_error_data_result("`datasets` can't be empty")
if ids: if ids:
for kb_id in ids: for kb_id in ids:
kbs = KnowledgebaseService.accessible(kb_id=chat_id, user_id=tenant_id) kbs = KnowledgebaseService.accessible(kb_id=kb_id, user_id=tenant_id)
if not kbs: if not kbs:
return get_error_data_result(f"You don't own the dataset {kb_id}") return get_error_data_result(f"You don't own the dataset {kb_id}")
kbs = KnowledgebaseService.query(id=kb_id) kbs = KnowledgebaseService.query(id=kb_id)