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

This commit is contained in:
Gerhard Schlager 2021-06-22 17:00:55 +02:00 committed by GitHub
parent 4a4cceca4d
commit 820068ddaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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