From 202ef276eefb5cdc75f5984fd78cdc8350d56895 Mon Sep 17 00:00:00 2001 From: bogdankostic Date: Mon, 3 Jan 2022 17:00:31 +0100 Subject: [PATCH] Make sure content_type exists (#1938) --- haystack/document_stores/weaviate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haystack/document_stores/weaviate.py b/haystack/document_stores/weaviate.py index 000d1decd..e17ff98fb 100644 --- a/haystack/document_stores/weaviate.py +++ b/haystack/document_stores/weaviate.py @@ -7,7 +7,6 @@ import logging import json import numpy as np from tqdm import tqdm -import pandas as pd from haystack.schema import Document from haystack.document_stores import BaseDocumentStore @@ -220,6 +219,7 @@ class WeaviateDocumentStore(BaseDocumentStore): # Converting JSON-string to original datatype (string or nested list) content = json.loads(str(props.get(self.content_field))) + content_type = None if props.get("contenttype") is not None: content_type = str(props.pop("contenttype"))