FIX: `fix_missing_s3` rake task could fail due to missing upload (#13479)

FIX: fix_missing_s3 rake task could fail due to missing upload (#13479)

diff --git a/lib/tasks/uploads.rake b/lib/tasks/uploads.rake
index 42d089f..2915cd2 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
 

GitHub sha: 820068ddaf23373d172dbae5169c4b21538fe1d5

This commit appears in #13479 which was approved by CvX. It was merged by gschlager.