Browse Source

Fix trying to privatize empty media attachments (#15414)

master
Eugen Rochko 3 years ago
committed by GitHub
parent
commit
473abc35a1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions
  1. +2
    -0
      app/services/suspend_account_service.rb
  2. +2
    -0
      app/services/unsuspend_account_service.rb

+ 2
- 0
app/services/suspend_account_service.rb View File

@ -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

+ 2
- 0
app/services/unsuspend_account_service.rb View File

@ -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…
Cancel
Save