Skip to content

Commit

Permalink
check dataset is none (langgenius#10682)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnJyong authored Nov 14, 2024
1 parent 317ae92 commit 70b9e4c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/tasks/document_indexing_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 70b9e4c

Please sign in to comment.