Skip to content

Commit

Permalink
another fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anakin87 committed Feb 17, 2025
1 parent 7465e1b commit d880cfe
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#
# SPDX-License-Identifier: Apache-2.0
import logging
from dataclasses import asdict
from typing import Any, Dict, List, Optional, Union

from haystack import default_from_dict, default_to_dict
Expand Down Expand Up @@ -180,7 +179,7 @@ def write_documents(

def _convert_input_document(document: Union[dict, Document]):
if isinstance(document, Document):
document_dict = asdict(document)
document_dict = document.to_dict(flatten=False)
elif isinstance(document, dict):
document_dict = document
else:
Expand Down

0 comments on commit d880cfe

Please sign in to comment.