fix: handle KeyError when accessing rules in CleanProcessor.clean (#10258)

pull/10291/head
pinsily 1 year ago committed by GitHub
parent 233bffdb7d
commit 5f21d13572
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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…
Cancel
Save