Kevin Hu
commited on
Commit
·
d97e2b8
1
Parent(s):
b88bbad
Fix doc progress issue. (#4520)
Browse files### 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 +1 -1
api/apps/sdk/doc.py
CHANGED
@@ -723,7 +723,7 @@ def stop_parsing(tenant_id, dataset_id):
|
|
723 |
doc = DocumentService.query(id=id, kb_id=dataset_id)
|
724 |
if not doc:
|
725 |
return get_error_data_result(message=f"You don't own the document {id}.")
|
726 |
-
if int(doc[0].progress) == 1 or
|
727 |
return get_error_data_result(
|
728 |
"Can't stop parsing document with progress at 0 or 1"
|
729 |
)
|
|
|
723 |
doc = DocumentService.query(id=id, kb_id=dataset_id)
|
724 |
if not doc:
|
725 |
return get_error_data_result(message=f"You don't own the document {id}.")
|
726 |
+
if int(doc[0].progress) == 1 or doc[0].progress == 0:
|
727 |
return get_error_data_result(
|
728 |
"Can't stop parsing document with progress at 0 or 1"
|
729 |
)
|