Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

Post fix of #23224 (#25007)

Yongtao Huang8fcc864fb764
diff --git a/api/core/rag/retrieval/dataset_retrieval.py b/api/core/rag/retrieval/dataset_retrieval.py
index 11010c9d606..1c1019e18cc 100644
--- a/api/core/rag/retrieval/dataset_retrieval.py
+++ b/api/core/rag/retrieval/dataset_retrieval.py
@@ -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 []