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.

check dataset is none (#10682)

Jyong70b9e4caf560
diff --git a/api/tasks/document_indexing_task.py b/api/tasks/document_indexing_task.py
index 72c4674e0fc..df1177d5788 100644
--- a/api/tasks/document_indexing_task.py
+++ b/api/tasks/document_indexing_task.py
@@ -25,7 +25,9 @@ def document_indexing_task(dataset_id: str, document_ids: list):
start_at = time.perf_counter()
dataset = db.session.query(Dataset).filter(Dataset.id == dataset_id).first()
-
+ if not dataset:
+ logging.info(click.style("Dataset is not found: {}".format(dataset_id), fg="yellow"))
+ return
# check document limit
features = FeatureService.get_features(dataset.tenant_id)
try: