DEV: do not correct sha when correctly uploads

This commit is contained in:
Sam Saffron 2020-08-13 11:52:57 +10:00
parent f48fa30ecd
commit 5011435ec7
No known key found for this signature in database
GPG Key ID: B9606168D2FFD9F5

View File

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