Revert "cheat to fix duplicate key on thumbnails"
This reverts commit 0c702522c4
.
This commit is contained in:
parent
6cd6484b5e
commit
1c18490141
|
@ -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 New Issue