diff --git a/app/models/communication/website/github_file.rb b/app/models/communication/website/github_file.rb index 00745fe4bea6c4482d52a03f61abf03dd2b14f34..e596d5839eb3a343d7f9151e5f72b913a301fcce 100644 --- a/app/models/communication/website/github_file.rb +++ b/app/models/communication/website/github_file.rb @@ -123,7 +123,11 @@ class Communication::Website::GithubFile < ApplicationRecord end def valid_for_publication? - return about.published? if about_type == 'Communication::Website::Post' - true + case about_type + when 'Communication::Website::Page', 'Communication::Website::Post' + about.published? + else + true + end end end