mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 00:41:16 +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:
@ -134,7 +134,7 @@ class ShrinkUploadedImage
|
|||||||
|
|
||||||
if existing_upload
|
if existing_upload
|
||||||
begin
|
begin
|
||||||
UploadReferences
|
UploadReference
|
||||||
.where(target_type: 'Post')
|
.where(target_type: 'Post')
|
||||||
.where(upload_id: original_upload.id)
|
.where(upload_id: original_upload.id)
|
||||||
.update_all(upload_id: upload.id)
|
.update_all(upload_id: upload.id)
|
||||||
|
@ -1029,7 +1029,7 @@ def fix_missing_s3
|
|||||||
puts "Failed to save upload #{save_error}"
|
puts "Failed to save upload #{save_error}"
|
||||||
else
|
else
|
||||||
OptimizedImage.where(upload_id: upload.id).destroy_all
|
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?
|
if rebake_ids.present?
|
||||||
Post.where(id: rebake_ids).each do |post|
|
Post.where(id: rebake_ids).each do |post|
|
||||||
|
Reference in New Issue
Block a user