about summary refs log tree commit diff
path: root/app/services/suspend_account_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-12-23 07:47:03 +0100
committerGitHub <noreply@github.com>2020-12-23 15:47:03 +0900
commit473abc35a19771304839dc57dc41ef309a826658 (patch)
treefae91f03390019d05c1562c25cace64d8988e2f4 /app/services/suspend_account_service.rb
parent444b21b55ff5768e4cbbaf7cfa8285c65a4b54f9 (diff)
Fix trying to privatize empty media attachments (#15414)
Diffstat (limited to 'app/services/suspend_account_service.rb')
-rw-r--r--app/services/suspend_account_service.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/suspend_account_service.rb b/app/services/suspend_account_service.rb
index 19d65280d..22e519708 100644
--- a/app/services/suspend_account_service.rb
+++ b/app/services/suspend_account_service.rb
@@ -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