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.

fix(datasets): retrieval_model null issue when updating dataset info (#25907)

quicksand680eb7a9f6fb
diff --git a/api/services/dataset_service.py b/api/services/dataset_service.py
index 51507886ada..8b3720026dc 100644
--- a/api/services/dataset_service.py
+++ b/api/services/dataset_service.py
@@ -532,7 +532,8 @@ class DatasetService:
filtered_data["updated_by"] = user.id
filtered_data["updated_at"] = naive_utc_now()
# update Retrieval model
- filtered_data["retrieval_model"] = data["retrieval_model"]
+ if data.get("retrieval_model"):
+ filtered_data["retrieval_model"] = data["retrieval_model"]
# update icon info
if data.get("icon_info"):
filtered_data["icon_info"] = data.get("icon_info")