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: document_create_args_validate (#8569)

Vikey Chen4f69adc8ab0b
diff --git a/api/services/dataset_service.py b/api/services/dataset_service.py
index 30c010ef29f..e96f06ed40f 100644
--- a/api/services/dataset_service.py
+++ b/api/services/dataset_service.py
@@ -1100,8 +1100,8 @@ class DocumentService:
DocumentService.data_source_args_validate(args)
DocumentService.process_rule_args_validate(args)
else:
- if ("data_source" not in args and not args["data_source"]) and (
- "process_rule" not in args and not args["process_rule"]
+ if ("data_source" not in args or not args["data_source"]) and (
+ "process_rule" not in args or not args["process_rule"]
):
raise ValueError("Data source or Process rule is required")
else: