Skip to content
Snippets Groups Projects
Commit 9103dc79 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Fix #411

parent 7df64321
No related branches found
No related tags found
No related merge requests found
......@@ -96,7 +96,7 @@ class Communication::Website::Post < ApplicationRecord
}
def published?
published && published_at&.to_date <= Date.today
published && published_at && published_at.to_date <= Date.today
end
# Is it used?
......@@ -152,7 +152,7 @@ class Communication::Website::Post < ApplicationRecord
end
def set_published_at
self.published_at = Time.zone.now if published? && published_at.nil?
self.published_at = Time.zone.now if published && published_at.nil?
end
def explicit_blob_ids
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment