From 235a4cfdc8b20a9763052eeb034c33f36fe4576a Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 25 Oct 2023 15:55:57 +0200 Subject: [PATCH] Fix batch attachment deletion when using OpenStack Swift (#27554) --- app/lib/attachment_batch.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/attachment_batch.rb b/app/lib/attachment_batch.rb index b75938bdd7..78bd593160 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