From 365ead6b5f460e17020bfa837c6bf078c72a498c Mon Sep 17 00:00:00 2001 From: Guillaume Lazzara Date: Mon, 4 Jul 2016 17:57:55 +0200 Subject: [PATCH] Fix access to content attribute --- lib/tasks/cloud_storage.rake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/tasks/cloud_storage.rake b/lib/tasks/cloud_storage.rake index 821866129..379fa081f 100644 --- a/lib/tasks/cloud_storage.rake +++ b/lib/tasks/cloud_storage.rake @@ -60,8 +60,7 @@ namespace :cloudstorage do [Cerfa, PieceJustificative, Procedure].each { |c| c.all.each { |entry| - content = entry.content - content = entry.logo if c == Procedure + content = (c == Procedure)? entry.logo : entry.content unless content.current_path.nil? if File.exist?(File.dirname(content.current_path) + '/uploaded') previous_filename = File.read(File.dirname(content.current_path) + '/uploaded')