diff --git a/app/lib/attachment_batch.rb b/app/lib/attachment_batch.rb index b75938bdd..78bd59316 100644 --- a/app/lib/attachment_batch.rb +++ b/app/lib/attachment_batch.rb @@ -75,7 +75,7 @@ class AttachmentBatch end when :fog logger.debug { "Deleting #{attachment.path(style)}" } - attachment.directory.files.new(key: attachment.path(style)).destroy + attachment.send(:directory).files.new(key: attachment.path(style)).destroy when :azure logger.debug { "Deleting #{attachment.path(style)}" } attachment.destroy