about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-10-11 12:09:58 -0500
committerFire Demon <firedemon@creature.cafe>2020-10-12 08:25:16 -0500
commitcfe6fc359ac985b8a464909463ff0bf1364560e4 (patch)
tree683168f79df71b2aa787b0f398662ecce0849ab0
parentc6af50f6bd41d88b96b541c6197dc9d6d75065ac (diff)
Skip empty style keys
-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 32b46f0e1..7ad4777ee 100644
--- a/app/services/suspend_account_service.rb
+++ b/app/services/suspend_account_service.rb
@@ -37,6 +37,8 @@ class SuspendAccountService < BaseService
         styles     = [:original] | attachment.styles.keys
 
         styles.each do |style|
+          next if attachment.path(style).blank?
+
           case Paperclip::Attachment.default_options[:storage]
           when :s3
             attachment.s3_object(style).acl.put({ acl: 'private' })