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: completion error when dataset was deleted (#819)

takatost2f179d61dcfb
diff --git a/api/core/orchestrator_rule_parser.py b/api/core/orchestrator_rule_parser.py
index 021f8c935f0..4755588ba52 100644
--- a/api/core/orchestrator_rule_parser.py
+++ b/api/core/orchestrator_rule_parser.py
@@ -188,6 +188,9 @@ class OrchestratorRuleParser:
Dataset.id == tool_config.get("id")
).first()
+ if not dataset:
+ return None
+
if dataset and dataset.available_document_count == 0 and dataset.available_document_count == 0:
return None