From acc73f298988b71d683d1292b16d2c84debc529b Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Thu, 25 Mar 2021 11:35:29 +0100 Subject: [PATCH] FIX: `uploads:fix_missing_s3` rake task used wrong SHA1 (#12495) --- lib/tasks/uploads.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/uploads.rake b/lib/tasks/uploads.rake index d2ab4e82c8d..8d183a58a5f 100644 --- a/lib/tasks/uploads.rake +++ b/lib/tasks/uploads.rake @@ -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