From 7df643212a0d0ef190a44e2221a4f338716154fc Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Wed, 25 May 2022 19:07:16 +0200
Subject: [PATCH] Fix #411

---
 app/models/communication/website/post.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/models/communication/website/post.rb b/app/models/communication/website/post.rb
index c498286f6..80cf1451b 100644
--- a/app/models/communication/website/post.rb
+++ b/app/models/communication/website/post.rb
@@ -96,7 +96,7 @@ class Communication::Website::Post < ApplicationRecord
   }
 
   def published?
-    published && published_at.to_date <= Date.today
+    published && published_at&.to_date <= Date.today
   end
 
   # Is it used?
-- 
GitLab