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: hit-test failed when attachment id is not exist (#29563)

Jyong04d09c2d77f0
diff --git a/api/services/hit_testing_service.py b/api/services/hit_testing_service.py
index 8e8e78f83f2..8cbf3a25c3c 100644
--- a/api/services/hit_testing_service.py
+++ b/api/services/hit_testing_service.py
@@ -178,8 +178,8 @@ class HitTestingService:
@classmethod
def hit_testing_args_check(cls, args):
- query = args["query"]
- attachment_ids = args["attachment_ids"]
+ query = args.get("query")
+ attachment_ids = args.get("attachment_ids")
if not attachment_ids and not query:
raise ValueError("Query or attachment_ids is required")