diff --git a/app/models/communication/website/permalink.rb b/app/models/communication/website/permalink.rb index e26ce4c8255f0c547ea00fc75eebb8305bf4aadd..344e2b09c32f702e6a6e33a13019fc8b52862b85 100644 --- a/app/models/communication/website/permalink.rb +++ b/app/models/communication/website/permalink.rb @@ -82,8 +82,8 @@ class Communication::Website::Permalink < ApplicationRecord end def computed_path - return nil unless published? - @computed_path ||= Static.clean_path(published_path) + return @computed_path if defined?(@computed_path) + @computed_path ||= published? ? Static.clean_path(published_path) : nil end def save_if_needed