mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
Fix CacheBuster being queued for missing media attachments (#34253)
This commit is contained in:
@@ -420,6 +420,8 @@ class MediaAttachment < ApplicationRecord
|
||||
|
||||
@paths_to_cache_bust = MediaAttachment.attachment_definitions.keys.flat_map do |attachment_name|
|
||||
attachment = public_send(attachment_name)
|
||||
next if attachment.blank?
|
||||
|
||||
styles = DEFAULT_STYLES | attachment.styles.keys
|
||||
styles.map { |style| attachment.url(style) }
|
||||
end.compact
|
||||
|
||||
Reference in New Issue
Block a user