diff --git a/app/models/communication/website/post.rb b/app/models/communication/website/post.rb index 6f810eaea49f76b5a214429abfa4527ee3113038..0cd59f91a802279033b58dea9fef6f14f5fe9c2e 100644 --- a/app/models/communication/website/post.rb +++ b/app/models/communication/website/post.rb @@ -71,7 +71,7 @@ class Communication::Website::Post < ApplicationRecord end def git_path(website) - "content/posts/#{published_at.year}/#{published_at.strftime "%Y-%m-%d"}-#{slug}.html" if published_at + "content/posts/#{published_at.year}/#{published_at.strftime "%Y-%m-%d"}-#{slug}.html" if published && published_at end def git_dependencies(website)