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.

🦄 refactor(dataset svc): delete check none (#4101)

羊羽13292ff73e5d
diff --git a/api/services/dataset_service.py b/api/services/dataset_service.py
index fa2ed808852..17399c8ac8d 100644
--- a/api/services/dataset_service.py
+++ b/api/services/dataset_service.py
@@ -131,13 +131,9 @@ class DatasetService:
@staticmethod
def get_dataset(dataset_id):
- dataset = Dataset.query.filter_by(
+ return Dataset.query.filter_by(
id=dataset_id
).first()
- if dataset is None:
- return None
- else:
- return dataset
@staticmethod
def check_dataset_model_setting(dataset):