Skip to content

Commit

Permalink
Make sure content_type exists (deepset-ai#1938)
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdankostic committed Jan 3, 2022
1 parent c85ac2b commit 202ef27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion haystack/document_stores/weaviate.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
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
Expand Down Expand Up @@ -220,6 +219,7 @@ def _convert_weaviate_result_to_document(
# 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"))

Expand Down

0 comments on commit 202ef27

Please sign in to comment.