From f4d084bcf10c62fc98742815005bbd7bf4409627 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Fri, 17 Jan 2025 18:28:15 +0800 Subject: [PATCH] Fix doc progress issue. (#4520) ### What problem does this PR solve? #4516 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- api/apps/sdk/doc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/apps/sdk/doc.py b/api/apps/sdk/doc.py index fa1ce58cf..1ff185d83 100644 --- a/api/apps/sdk/doc.py +++ b/api/apps/sdk/doc.py @@ -723,7 +723,7 @@ def stop_parsing(tenant_id, dataset_id): doc = DocumentService.query(id=id, kb_id=dataset_id) if not doc: return get_error_data_result(message=f"You don't own the document {id}.") - if int(doc[0].progress) == 1 or int(doc[0].progress) == 0: + if int(doc[0].progress) == 1 or doc[0].progress == 0: return get_error_data_result( "Can't stop parsing document with progress at 0 or 1" )