liuhua liuhua commited on
Commit
aeb875a
·
1 Parent(s): 1275b47

Fix the bug that prevented modifying `dataset_ids` (#3784)

Browse files

### 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 <[email protected]>

Files changed (1) hide show
  1. api/apps/sdk/chat.py +1 -1
api/apps/sdk/chat.py CHANGED
@@ -161,7 +161,7 @@ def update(tenant_id,chat_id):
161
  return get_error_data_result("`datasets` can't be empty")
162
  if ids:
163
  for kb_id in ids:
164
- kbs = KnowledgebaseService.accessible(kb_id=chat_id, user_id=tenant_id)
165
  if not kbs:
166
  return get_error_data_result(f"You don't own the dataset {kb_id}")
167
  kbs = KnowledgebaseService.query(id=kb_id)
 
161
  return get_error_data_result("`datasets` can't be empty")
162
  if ids:
163
  for kb_id in ids:
164
+ kbs = KnowledgebaseService.accessible(kb_id=kb_id, user_id=tenant_id)
165
  if not kbs:
166
  return get_error_data_result(f"You don't own the dataset {kb_id}")
167
  kbs = KnowledgebaseService.query(id=kb_id)