mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-17 04:13:01 +00:00
Fix trying to privatize empty media attachments (#15414)
This commit is contained in:
parent
444b21b55f
commit
473abc35a1
|
@ -65,6 +65,8 @@ class SuspendAccountService < BaseService
|
|||
attachment = media_attachment.public_send(attachment_name)
|
||||
styles = [:original] | attachment.styles.keys
|
||||
|
||||
next if attachment.blank?
|
||||
|
||||
styles.each do |style|
|
||||
case Paperclip::Attachment.default_options[:storage]
|
||||
when :s3
|
||||
|
|
|
@ -56,6 +56,8 @@ class UnsuspendAccountService < BaseService
|
|||
attachment = media_attachment.public_send(attachment_name)
|
||||
styles = [:original] | attachment.styles.keys
|
||||
|
||||
next if attachment.blank?
|
||||
|
||||
styles.each do |style|
|
||||
case Paperclip::Attachment.default_options[:storage]
|
||||
when :s3
|
||||
|
|
Loading…
Reference in a new issue