mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: OptimizedImage model doesn't have 'created_at' date column
This commit is contained in:
parent
426bd810f1
commit
b8d2549922
@ -46,7 +46,7 @@ class S3Inventory
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
uploads = model.where("created_at < ?", last_modified)
|
uploads = (model == Upload) ? model.where("created_at < ?", last_modified) : model
|
||||||
missing_uploads = uploads.joins("LEFT JOIN #{table_name} ON #{table_name}.etag = #{model.table_name}.etag").where("#{table_name}.etag is NULL")
|
missing_uploads = uploads.joins("LEFT JOIN #{table_name} ON #{table_name}.etag = #{model.table_name}.etag").where("#{table_name}.etag is NULL")
|
||||||
|
|
||||||
if (missing_count = missing_uploads.count) > 0
|
if (missing_count = missing_uploads.count) > 0
|
||||||
|
Loading…
Reference in New Issue
Block a user