Don't push to cache buster if attachment path is nil (#31414)
This commit is contained in:
parent
8d96907933
commit
95c11d365d
2 changed files with 1 additions and 3 deletions
|
@ -422,7 +422,7 @@ class MediaAttachment < ApplicationRecord
|
|||
attachment = public_send(attachment_name)
|
||||
styles = DEFAULT_STYLES | attachment.styles.keys
|
||||
styles.map { |style| attachment.path(style) }
|
||||
end
|
||||
end.compact
|
||||
rescue => e
|
||||
# We really don't want any error here preventing media deletion
|
||||
Rails.logger.warn "Error #{e.class} busting cache: #{e.message}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue