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: handle KeyError when accessing rules in CleanProcessor.clean (#10258)

pinsily5f21d13572aa
diff --git a/api/core/indexing_runner.py b/api/core/indexing_runner.py
index fb9fe8f210d..e2a94073cf4 100644
--- a/api/core/indexing_runner.py
+++ b/api/core/indexing_runner.py
@@ -598,7 +598,7 @@ class IndexingRunner:
rules = DatasetProcessRule.AUTOMATIC_RULES
else:
rules = json.loads(processing_rule.rules) if processing_rule.rules else {}
- document_text = CleanProcessor.clean(text, rules)
+ document_text = CleanProcessor.clean(text, {"rules": rules})
return document_text