Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix doc progress issue. (#4520)

Kevin Huf4d084bcf10c
diff --git a/api/apps/sdk/doc.py b/api/apps/sdk/doc.py
index fa1ce58cf0..1ff185d836 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"
)