Skip to content
Snippets Groups Projects
Unverified Commit 473abc35 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Fix trying to privatize empty media attachments (#15414)

parent 444b21b5
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment