mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 06:19:03 +08:00
fix: handle KeyError when accessing rules in CleanProcessor.clean (#10258)
This commit is contained in:
parent
233bffdb7d
commit
5f21d13572
@ -598,7 +598,7 @@ class IndexingRunner:
|
|||||||
rules = DatasetProcessRule.AUTOMATIC_RULES
|
rules = DatasetProcessRule.AUTOMATIC_RULES
|
||||||
else:
|
else:
|
||||||
rules = json.loads(processing_rule.rules) if processing_rule.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
|
return document_text
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user