From 2fd39b2f317eae9adcbb8a3c0e731e0d631f088b Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Fri, 18 Oct 2024 10:39:21 +0200
Subject: [PATCH] Fix #2342

---
 .../communication/blocks/templates/posts/_snippet.html.erb      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/views/admin/communication/blocks/templates/posts/_snippet.html.erb b/app/views/admin/communication/blocks/templates/posts/_snippet.html.erb
index c366cb425..bfbf93ddd 100644
--- a/app/views/admin/communication/blocks/templates/posts/_snippet.html.erb
+++ b/app/views/admin/communication/blocks/templates/posts/_snippet.html.erb
@@ -1,7 +1,7 @@
 <%  if block.template.mode == 'categories' %>
   <% @website.post_categories.ordered(current_language).each do |category| %>
     <p><%= category.to_s_in(current_language) %></p>
-  <% end %>
+  <% end if @website%>
 <% else %>
   <div class="row">
   <% block.template.selected_posts.each do |post|
-- 
GitLab