diff --git a/app/graph/types/cluster_type.rb b/app/graph/types/cluster_type.rb index 092d15a46c..f5859e039f 100644 --- a/app/graph/types/cluster_type.rb +++ b/app/graph/types/cluster_type.rb @@ -18,12 +18,6 @@ def fact_checks_count field :center, ProjectMediaType, null: true - def center - RecordLoader - .for(ProjectMedia) - .load(object.project_media_id) - end - field :first_item_at, GraphQL::Types::Int, null: true def first_item_at diff --git a/app/models/feed.rb b/app/models/feed.rb index 3fd3b5b618..05a652024f 100755 --- a/app/models/feed.rb +++ b/app/models/feed.rb @@ -140,7 +140,7 @@ def clusters_count(args = {}) def filtered_clusters(args = {}) team_ids = args[:team_ids] channels = args[:channels] - query = self.clusters + query = self.clusters.joins(:project_media) # Filter by workspace query = query.where.not("ARRAY[?] && team_ids", self.team_ids - team_ids.to_a.map(&:to_i)) if !team_ids.blank? && team_ids != self.team_ids