mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Don't fail on missing images when resizing
The changed code obtains the image dimensions when you first upload an image. Unfortunately it's also triggered when thumbnails are refreshed. That doesn't change the size of the original image though.
This commit is contained in:
@@ -34,6 +34,8 @@ module Spree
|
||||
end
|
||||
|
||||
def find_dimensions
|
||||
return if attachment.errors.present?
|
||||
|
||||
temporary = attachment.queued_for_write[:original]
|
||||
filename = temporary.path unless temporary.nil?
|
||||
filename = attachment.path if filename.blank?
|
||||
|
||||
Reference in New Issue
Block a user