Fix trying to privatize empty media attachments (#15414)
parent
dcb4c20fc1
commit
e4f5e9c029
|
@ -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 New Issue