From 863ba46b00ea8b736e7473264e54b73029cafb60 Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 25 Oct 2023 14:07:43 +0200 Subject: [PATCH] Fix batch attachment deletion when using OpenStack Swift Fixes an issue introduced by #23302. `directory` is a private method. --- 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 b75938bdd7621..78bd593160353 100644 --- a/app/lib/attachment_batch.rb +++ b/app/lib/attachment_batch.rb @@ -75,7 +75,7 @@ def remove_files 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