fix wrong error message (#7972)

This commit is contained in:
Jyong 2024-09-04 16:46:41 +08:00 committed by GitHub
parent 0f72a8e89d
commit 15791510c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,7 +37,7 @@ class SegmentApi(DatasetApiResource):
if not document:
raise NotFound("Document not found.")
if document.indexing_status != "completed":
raise NotFound("Document is already completed.")
raise NotFound("Document is not completed.")
if not document.enabled:
raise NotFound("Document is disabled.")
# check embedding model setting