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.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
raise error when process_rule is required but missing (#20599)
Abdullah AlOsaimi006496f24ec1
diff --git a/api/controllers/service_api/dataset/document.py b/api/controllers/service_api/dataset/document.pyindex 418363ffbbd..ea8a9f0f417 100644--- a/api/controllers/service_api/dataset/document.py+++ b/api/controllers/service_api/dataset/document.py@@ -206,12 +206,16 @@ class DocumentAddByFileApi(DatasetApiResource):knowledge_config = KnowledgeConfig(**args)DocumentService.document_create_args_validate(knowledge_config)+ dataset_process_rule = dataset.latest_process_rule if "process_rule" not in args else None+ if not knowledge_config.original_document_id and not dataset_process_rule and not knowledge_config.process_rule:+ raise ValueError("process_rule is required.")+try:documents, batch = DocumentService.save_document_with_dataset_id(dataset=dataset,knowledge_config=knowledge_config,account=dataset.created_by_account,- dataset_process_rule=dataset.latest_process_rule if "process_rule" not in args else None,+ dataset_process_rule=dataset_process_rule,created_from="api",)except ProviderTokenNotInitError as ex: