mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-31 21:37:16 +00:00
Avoid urls generation when the logo attachment is not saved yet
This commit is contained in:
@@ -62,7 +62,7 @@ module Api
|
||||
# medium: LOGO_MEDIUM_URL
|
||||
# }
|
||||
def attachment_urls(attachment, styles)
|
||||
return unless attachment.variable?
|
||||
return unless attachment.persisted? && attachment.variable?
|
||||
|
||||
styles.index_with do |style|
|
||||
Rails.application.routes.url_helpers.
|
||||
|
||||
Reference in New Issue
Block a user