fix: completion error when dataset was deleted (#819)

This commit is contained in:
takatost 2023-08-13 00:25:05 +08:00 committed by GitHub
parent 7457550673
commit 2f179d61dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -188,6 +188,9 @@ class OrchestratorRuleParser:
Dataset.id == tool_config.get("id")
).first()
if not dataset:
return None
if dataset and dataset.available_document_count == 0 and dataset.available_document_count == 0:
return None