check dataset is none (#10682)

This commit is contained in:
Jyong 2024-11-14 14:07:19 +08:00 committed by GitHub
parent 317ae9233e
commit 70b9e4caf5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: