diff --git a/app/models/university/person/administrator.rb b/app/models/university/person/administrator.rb index 82976022e823969216acde098bb649c11b5dd955..63f04ef1e6b6c7f02320baf8f490724c88c4f57f 100644 --- a/app/models/university/person/administrator.rb +++ b/app/models/university/person/administrator.rb @@ -40,8 +40,15 @@ class University::Person::Administrator < University::Person def for_website?(website) is_administration && website.about_school? && ( - website.about.university_people_through_role_involvements.find_by(id: id).present? || - website.programs.published.joins(:involvements_through_roles).where(university_person_involvements: { person_id: id }).any? + website.about + .university_people_through_role_involvements + .find_by(id: id) + .present? || + website.programs + .published + .joins(:involvements_through_roles) + .where(university_person_involvements: { person_id: id }) + .any? ) end end