From 19d31bea03af32b2c680f26bb0bf45b60c9bd2f0 Mon Sep 17 00:00:00 2001 From: Molly Struve Date: Wed, 1 Apr 2020 15:02:14 -0500 Subject: [PATCH] delegate published in Elasticsearch to podcast to avoid showing ALL PDEs (#7006) --- app/serializers/search/podcast_episode_serializer.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/serializers/search/podcast_episode_serializer.rb b/app/serializers/search/podcast_episode_serializer.rb index 8490ca232..8857897bd 100644 --- a/app/serializers/search/podcast_episode_serializer.rb +++ b/app/serializers/search/podcast_episode_serializer.rb @@ -5,13 +5,16 @@ module Search attribute :id, &:search_id attributes :body_text, :class_name, :comments_count, :hotness_score, :path, - :positive_reactions_count, :published, :published_at, :quote, + :positive_reactions_count, :published_at, :quote, :reactions_count, :search_score, :subtitle, :summary, :title, :website_url attribute :main_image do |pde| ProfileImage.new(pde.podcast).get(width: 90) end + attribute :published do |pde| + pde.podcast.published + end attribute :slug, &:podcast_slug attribute :tags do |pde|