瀏覽代碼

Fix: doc deletion failure with invalid docid. (#6194)

### What problem does this PR solve?

#6174

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.18.0
Kevin Hu 7 月之前
父節點
當前提交
1b9f63f799
No account linked to committer's email address
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2
    1
      api/apps/sdk/doc.py

+ 2
- 1
api/apps/sdk/doc.py 查看文件

@@ -600,7 +600,8 @@ def delete(tenant_id, dataset_id):
try:
e, doc = DocumentService.get_by_id(doc_id)
if not e:
return get_error_data_result(message="Document not found!")
errors += f"Document({doc_id}) not found!"
continue
tenant_id = DocumentService.get_tenant_id(doc_id)
if not tenant_id:
return get_error_data_result(message="Tenant not found!")

Loading…
取消
儲存