FIX: Should be UploadReference instead of UploadReferences (#17361)

This fixes a couple of typos that were introduced in 9db8f00
This commit is contained in:
tshenry 2022-07-06 11:40:54 -07:00 committed by GitHub
parent fbc89dd41a
commit d1a15d4f8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@ class ShrinkUploadedImage
if existing_upload
begin
UploadReferences
UploadReference
.where(target_type: 'Post')
.where(upload_id: original_upload.id)
.update_all(upload_id: upload.id)

View File

@ -1029,7 +1029,7 @@ def fix_missing_s3
puts "Failed to save upload #{save_error}"
else
OptimizedImage.where(upload_id: upload.id).destroy_all
rebake_ids = UploadReferences.where(upload_id: upload.id).where(target_type: 'Post').pluck(:target_id)
rebake_ids = UploadReference.where(upload_id: upload.id).where(target_type: 'Post').pluck(:target_id)
if rebake_ids.present?
Post.where(id: rebake_ids).each do |post|