From 23b68fa5aa191551e59dd4cb81af80c18240d3bb Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Wed, 27 Sep 2023 10:12:12 +0200 Subject: [PATCH] pj_migration: destroy blob if not found --- app/jobs/pjs_migration_job.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/jobs/pjs_migration_job.rb b/app/jobs/pjs_migration_job.rb index 06acaafd6..eeeb1dc67 100644 --- a/app/jobs/pjs_migration_job.rb +++ b/app/jobs/pjs_migration_job.rb @@ -24,6 +24,7 @@ class PjsMigrationJob < ApplicationJob client.delete_object(container, old_key) end rescue Fog::OpenStack::Storage::NotFound + blob.attachments.destroy_all end def already_moved?(blob)