Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

optimize the knowledge failed documents query (#3870)

Charlie.Weif62b2b5b45d0
diff --git a/api/services/dataset_service.py b/api/services/dataset_service.py
index aaf6076d125..fa2ed808852 100644
--- a/api/services/dataset_service.py
+++ b/api/services/dataset_service.py
@@ -418,9 +418,8 @@ class DocumentService:
def get_error_documents_by_dataset_id(dataset_id: str) -> list[Document]:
documents = db.session.query(Document).filter(
Document.dataset_id == dataset_id,
- Document.indexing_status == 'error' or Document.indexing_status == 'paused'
+ Document.indexing_status.in_(['error', 'paused'])
).all()
-
return documents
@staticmethod