mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:42:02 +08:00
FIX: Should be UploadReference instead of UploadReferences (#17361)
This fixes a couple of typos that were introduced in 9db8f00
This commit is contained in:
parent
fbc89dd41a
commit
d1a15d4f8d
|
@ -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)
|
||||
|
|
|
@ -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|
|
||||
|
|
Loading…
Reference in New Issue
Block a user