diff --git a/lib/tasks/uploads.rake b/lib/tasks/uploads.rake index 42d089fcef6..2915cd2fb10 100644 --- a/lib/tasks/uploads.rake +++ b/lib/tasks/uploads.rake @@ -1006,7 +1006,8 @@ def fix_missing_s3 verification_status: Upload.verification_statuses[:invalid_etag] ).pluck(:id) ids.each do |id| - upload = Upload.find(id) + upload = Upload.find_by(id: id) + next if !upload tempfile = nil