From d880cfeedfe09a4878e8d6cb44e1ff20c0cc5d01 Mon Sep 17 00:00:00 2001 From: anakin87 Date: Mon, 17 Feb 2025 11:04:45 +0100 Subject: [PATCH] another fix --- .../document_stores/astra/document_store.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/integrations/astra/src/haystack_integrations/document_stores/astra/document_store.py b/integrations/astra/src/haystack_integrations/document_stores/astra/document_store.py index 2c9efe6bb..81c120d09 100644 --- a/integrations/astra/src/haystack_integrations/document_stores/astra/document_store.py +++ b/integrations/astra/src/haystack_integrations/document_stores/astra/document_store.py @@ -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 @@ -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: