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.

Fix:condition for dataset availability check (#973)

yezhwi117a209ad422
diff --git a/api/services/hit_testing_service.py b/api/services/hit_testing_service.py
index 4c2a8bf9042..b6e622a90b9 100644
--- a/api/services/hit_testing_service.py
+++ b/api/services/hit_testing_service.py
@@ -19,7 +19,7 @@ from models.dataset import Dataset, DocumentSegment, DatasetQuery
class HitTestingService:
@classmethod
def retrieve(cls, dataset: Dataset, query: str, account: Account, limit: int = 10) -> dict:
- if dataset.available_document_count == 0 or dataset.available_document_count == 0:
+ if dataset.available_document_count == 0 or dataset.available_segment_count == 0:
return {
"query": {
"content": query,
diff --git a/web/.gitignore b/web/.gitignore
index 35d1a1461b1..69429418778 100644
--- a/web/.gitignore
+++ b/web/.gitignore
@@ -15,6 +15,8 @@
# production
/build
+/.history
+
# misc
.DS_Store
*.pem