Skip to content

Commit

Permalink
fix: handle KeyError when accessing rules in CleanProcessor.clean (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
pinsily authored Nov 5, 2024
1 parent 233bffd commit 5f21d13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/core/indexing_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ def _document_clean(text: str, processing_rule: DatasetProcessRule) -> str:
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

Expand Down

0 comments on commit 5f21d13

Please sign in to comment.