fix: List Chunks API fails to return the correct document status. (#8347)
### What problem does this PR solve?
The existing
/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks endpoint
fails to accurately return a document's chunk status. Even when a chunk
is explicitly marked as unavailable, the API still returns true.


Co-authored-by: zhoudeyong <zhoudeyong@idr.ai>
This commit is contained in:
parent
8f3fe63d73
commit
4784aa5b0b
1 changed files with 3 additions and 0 deletions
|
|
@ -483,6 +483,9 @@ class ESConnection(DocStoreConnection):
|
|||
if isinstance(v, list):
|
||||
m[n] = v
|
||||
continue
|
||||
if n == "available_int" and isinstance(v, (int, float)):
|
||||
m[n] = v
|
||||
continue
|
||||
if not isinstance(v, str):
|
||||
m[n] = str(m[n])
|
||||
# if n.find("tks") > 0:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue