Skip to content

Commit

Permalink
Update document_writer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Juliani committed Apr 24, 2024
1 parent ec0e222 commit 17f7d06
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions haystack/components/writers/document_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,8 @@ def run(self, documents: List[Document], policy: Optional[DuplicatePolicy] = Non
if policy is None:
policy = self.policy

for document in documents:
document.content = document.content.replace('\x00', '')

documents_written = self.document_store.write_documents(documents=documents, policy=policy)
return {"documents_written": documents_written}

0 comments on commit 17f7d06

Please sign in to comment.