From b85ee98b1fd9bac6798c2f5c514f4aad24576e5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Gaya?= <sebastien.gaya@gmail.com>
Date: Tue, 9 Nov 2021 11:35:29 +0100
Subject: [PATCH] fix

---
 app/views/admin/communication/websites/import.html.erb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/views/admin/communication/websites/import.html.erb b/app/views/admin/communication/websites/import.html.erb
index ca2c0ae55..d32cdcfd0 100644
--- a/app/views/admin/communication/websites/import.html.erb
+++ b/app/views/admin/communication/websites/import.html.erb
@@ -26,7 +26,7 @@
           <td class="text-end">
             <%= link_to t('show'),
                           admin_communication_website_post_path(website_id: post.post.website.id, id: post.post.id),
-                          class: button_classes %>
+                          class: button_classes if post.post.present? %>
           </td>
         </tr>
       <% end %>
@@ -57,7 +57,7 @@
           <td class="text-end">
             <%= link_to t('show'),
                           admin_communication_website_page_path(website_id: page.page.website.id, id: page.page.id),
-                          class: button_classes %>
+                          class: button_classes if page.page.present? %>
           </td>
         </tr>
       <% end %>
-- 
GitLab