DEV: do not correct sha when correctly uploads

DEV: do not correct sha when correctly uploads

diff --git a/lib/tasks/uploads.rake b/lib/tasks/uploads.rake
index 6687814..7203e53 100644
--- a/lib/tasks/uploads.rake
+++ b/lib/tasks/uploads.rake
@@ -1082,7 +1082,9 @@ def fix_missing_s3
         raise ActiveRecord::Rollback
       end
 
-      upload.update!(etag: fixed_upload.etag, sha1: fixed_upload.sha1, url: fixed_upload.url, verified: nil)
+      # we do not fix sha, it may be wrong for arbitrary reasons, if we correct it
+      # we may end up breaking posts
+      upload.update!(etag: fixed_upload.etag, url: fixed_upload.url, verified: nil)
     end
   end
 

GitHub sha: 5011435e

The intention of the author was to say “when correcting” but sadly uploads have fried my :face_with_head_bandage:

1 Like