From c1e2ac47bf25f209f357287c7394a04d8adfd92f Mon Sep 17 00:00:00 2001 From: Arnaud Levy <contact@arnaudlevy.com> Date: Sat, 23 Oct 2021 18:29:15 +0200 Subject: [PATCH] remove useless ensure --- app/models/communication/website/imported/post.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/communication/website/imported/post.rb b/app/models/communication/website/imported/post.rb index e199cce4a..b743fad87 100644 --- a/app/models/communication/website/imported/post.rb +++ b/app/models/communication/website/imported/post.rb @@ -110,8 +110,7 @@ class Communication::Website::Imported::Post < ApplicationRecord response = http.request(request) begin post.featured_image.attach(io: StringIO.new(response.body), filename: filename, content_type: 'image/jpeg') - ensure - tempfile.close! + rescue end end end -- GitLab