From 5011435ec73f720821ae6278c559afc00df8ac23 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Thu, 13 Aug 2020 11:52:57 +1000 Subject: [PATCH] DEV: do not correct sha when correctly uploads --- lib/tasks/uploads.rake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/tasks/uploads.rake b/lib/tasks/uploads.rake index 6687814306c..7203e533606 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