mirror of
https://github.com/langgenius/dify.git
synced 2026-02-19 17:34:41 +08:00
parent
ed5ed0306e
commit
8fcc864fb7
@ -534,7 +534,6 @@ class DatasetRetrieval:
|
||||
synchronize_session=False,
|
||||
)
|
||||
)
|
||||
db.session.commit()
|
||||
else:
|
||||
query = db.session.query(DocumentSegment).where(
|
||||
DocumentSegment.index_node_id == document.metadata["doc_id"]
|
||||
@ -596,7 +595,7 @@ class DatasetRetrieval:
|
||||
with flask_app.app_context():
|
||||
with Session(db.engine) as session:
|
||||
dataset_stmt = select(Dataset).where(Dataset.id == dataset_id)
|
||||
dataset = db.session.scalar(dataset_stmt)
|
||||
dataset = session.scalar(dataset_stmt)
|
||||
|
||||
if not dataset:
|
||||
return []
|
||||
|
||||
Loading…
Reference in New Issue
Block a user