mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
Revert "cheat to fix duplicate key on thumbnails"
This reverts commit 0c702522c4
.
This commit is contained in:
parent
6cd6484b5e
commit
1c18490141
1 changed files with 0 additions and 5 deletions
|
@ -34,11 +34,6 @@ class Upload < ActiveRecord::Base
|
|||
return unless width > SiteSetting.auto_link_images_wider_than
|
||||
return if has_thumbnail?
|
||||
thumbnail = OptimizedImage.create_for(self, width, height)
|
||||
# TODO: @regis we may want to do the more cleanly, create_for may change the dimensions
|
||||
# this avoids a duplicate key, it should be done more cleanly, this is cheating
|
||||
thumbnail.width = width
|
||||
thumbnail.height = height
|
||||
|
||||
optimized_images << thumbnail if thumbnail
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue