diff --git a/app/models/communication/website/post.rb b/app/models/communication/website/post.rb index a0414d905f0ab44a1b7a8c80524ddd802404b64a..222d9a439819617e39887d149f9a556cfc87a722 100644 --- a/app/models/communication/website/post.rb +++ b/app/models/communication/website/post.rb @@ -73,7 +73,7 @@ class Communication::Website::Post < ApplicationRecord end def git_dependencies(website) - [self] + [author] + categories + active_storage_blobs + [self] + [author, author&.author] + categories + active_storage_blobs end def git_destroy_dependencies(website) diff --git a/app/models/communication/website/with_abouts.rb b/app/models/communication/website/with_abouts.rb index c70963fe6daf3831ebb7efbe7d0e7c8b60842612..7606add7a2e4e0bb68be8471072e2487b183582d 100644 --- a/app/models/communication/website/with_abouts.rb +++ b/app/models/communication/website/with_abouts.rb @@ -42,7 +42,9 @@ module Communication::Website::WithAbouts def people @people ||= ( posts.collect(&:author) + - programs.collect(&:university_people_through_teachers).flatten + posts.collect(&:author).map(&:author) + + programs.collect(&:university_people_through_teachers).flatten + + programs.collect(&:university_people_through_teachers).flatten.map(&:teacher) # TODO researchers via articles ).uniq.compact end