From 4c590e9d2e23d24666ed68a0cfbce3a2a2d39160 Mon Sep 17 00:00:00 2001
From: Yoshiyuki Hirano <yhirano@me.com>
Date: Tue, 12 Dec 2017 02:51:03 +0900
Subject: Return `nil` instead of `false` if raise
 `Azure::Core::Http::HTTPError`

* If it raise error `Azure::Core::Http::HTTPError`, return `nil` instead of `false` in
  `ActiveStorage::Service::AzureStorageService#delete`.

* Other services behave as same as this.
---
 activestorage/lib/active_storage/service/azure_storage_service.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'activestorage')

diff --git a/activestorage/lib/active_storage/service/azure_storage_service.rb b/activestorage/lib/active_storage/service/azure_storage_service.rb
index 19b09991b3..0a9eb7f23d 100644
--- a/activestorage/lib/active_storage/service/azure_storage_service.rb
+++ b/activestorage/lib/active_storage/service/azure_storage_service.rb
@@ -46,7 +46,7 @@ module ActiveStorage
         begin
           blobs.delete_blob(container, key)
         rescue Azure::Core::Http::HTTPError
-          false
+          # Ignore files already deleted
         end
       end
     end
-- 
cgit v1.2.3