From c38dfc786109f4a82a040c532b6e2560589eb503 Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Tue, 11 Apr 2023 06:39:26 +0200
Subject: [PATCH] fix missing test

---
 .../blocks/templates/partners/_preview.html.erb           | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/app/views/admin/communication/blocks/templates/partners/_preview.html.erb b/app/views/admin/communication/blocks/templates/partners/_preview.html.erb
index 1fc3ea542..b68fde36b 100644
--- a/app/views/admin/communication/blocks/templates/partners/_preview.html.erb
+++ b/app/views/admin/communication/blocks/templates/partners/_preview.html.erb
@@ -54,9 +54,11 @@
                   </a>
                 <% end %>
               </h3>
-              <div class="media">
-                <%= kamifusen_tag element.best_logo, width: 600 %>
-              </div>
+              <% if element.best_logo.attached? %>
+                <div class="media">
+                  <%= kamifusen_tag element.best_logo, width: 600 %>
+                </div>
+              <% end %>
             </article>
           <% end %>
         </div>
-- 
GitLab