diff --git a/robotoff/workers/tasks/import_image.py b/robotoff/workers/tasks/import_image.py index b644d20727..d9c3f086ae 100644 --- a/robotoff/workers/tasks/import_image.py +++ b/robotoff/workers/tasks/import_image.py @@ -70,7 +70,11 @@ def run_import_image_job( return with db: - save_image(barcode, source_image, product, server_domain) + image_model = save_image(barcode, source_image, product, server_domain) + + if image_model is None: + # The image is invalid, no need to perform image extraction jobs + return enqueue_job( import_insights_from_image,