From a022b8a7d43695a9e782926d03d6e0320aa1345f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Gaya?= <sebastien.gaya@gmail.com> Date: Mon, 17 Jan 2022 19:03:22 +0100 Subject: [PATCH] fix --- 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 693b64bc5..77f295375 100644 --- a/app/models/communication/website/post.rb +++ b/app/models/communication/website/post.rb @@ -94,6 +94,6 @@ class Communication::Website::Post < ApplicationRecord end def set_published_at - self.published_at = published? ? Time.zone.now : nil + self.published_at = Time.zone.now if published? && published_at.nil? end end -- GitLab