FIX: `uploads:fix_missing_s3` rake task used wrong SHA1 (#12495)

This commit is contained in:
Gerhard Schlager 2021-03-25 11:35:29 +01:00 committed by GitHub
parent c03c85e661
commit acc73f2989
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1023,7 +1023,7 @@ def fix_missing_s3
fix_error = nil
Upload.transaction do
begin
upload.update!(sha1: SecureRandom.hex)
upload.update_column(:sha1, SecureRandom.hex)
fixed_upload = UploadCreator.new(tempfile, "temp.#{upload.extension}").create_for(Discourse.system_user.id)
rescue => fix_error
# invalid extension is the most common issue