Avoid urls generation when the logo attachment is not saved yet

This commit is contained in:
François Turbelin
2025-10-27 18:00:57 +01:00
parent efb7da316a
commit ba9dca4b05

View File

@@ -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.