mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +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
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user