mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-11-07 21:33:53 +00:00
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
@ -483,6 +483,9 @@ class ESConnection(DocStoreConnection):
|
|||||||
if isinstance(v, list):
|
if isinstance(v, list):
|
||||||
m[n] = v
|
m[n] = v
|
||||||
continue
|
continue
|
||||||
|
if n == "available_int" and isinstance(v, (int, float)):
|
||||||
|
m[n] = v
|
||||||
|
continue
|
||||||
if not isinstance(v, str):
|
if not isinstance(v, str):
|
||||||
m[n] = str(m[n])
|
m[n] = str(m[n])
|
||||||
# if n.find("tks") > 0:
|
# if n.find("tks") > 0:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user