mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-10 11:26:52 +08:00
fix the return with wrong datatype of segment (#3525)
This commit is contained in:
@@ -84,7 +84,7 @@ class DatasetDocumentStore:
|
|||||||
if not isinstance(doc, Document):
|
if not isinstance(doc, Document):
|
||||||
raise ValueError("doc must be a 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
|
# NOTE: doc could already exist in the store, but we overwrite it
|
||||||
if not allow_update and segment_document:
|
if not allow_update and segment_document:
|
||||||
|
|||||||
Reference in New Issue
Block a user