From a52d31e25e29a9a0405113857df2ce598f0780dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Wed, 10 Jun 2015 18:18:20 +0200 Subject: [PATCH] FIX: properly handle external image download errors --- app/models/optimized_image.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/optimized_image.rb b/app/models/optimized_image.rb index 3a0c5aaa82c..a9085246759 100644 --- a/app/models/optimized_image.rb +++ b/app/models/optimized_image.rb @@ -26,7 +26,7 @@ class OptimizedImage < ActiveRecord::Base # create the thumbnail otherwise original_path = Discourse.store.path_for(upload) if original_path.blank? - external_copy = Discourse.store.download(upload) + external_copy = Discourse.store.download(upload) rescue nil original_path = external_copy.try(:path) end