Explorar o código

fix the return with wrong datatype of segment (#3525)

Jyong hai 1 ano
pai
achega
9e6d4eeb92
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      api/core/docstore/dataset_docstore.py

+ 1 - 1
api/core/docstore/dataset_docstore.py

@@ -84,7 +84,7 @@ class DatasetDocumentStore:
             if not isinstance(doc, Document):
                 raise ValueError("doc must be a Document")
 
-            segment_document = self.get_document(doc_id=doc.metadata['doc_id'], raise_error=False)
+            segment_document = self.get_document_segment(doc_id=doc.metadata['doc_id'])
 
             # NOTE: doc could already exist in the store, but we overwrite it
             if not allow_update and segment_document: