From 1b9f63f799c48c2131f3cba45b38316269c7d1e1 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Tue, 18 Mar 2025 10:44:50 +0800 Subject: [PATCH] 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) --- api/apps/sdk/doc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/apps/sdk/doc.py b/api/apps/sdk/doc.py index 0e54613df..b2ea6d4d4 100644 --- a/api/apps/sdk/doc.py +++ b/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!")