From bac3abd704866809ecc25076e9213173af24e4cd Mon Sep 17 00:00:00 2001 From: chiu Date: Thu, 20 Nov 2025 12:34:51 +0000 Subject: [PATCH] Revert: Remove unnecessary changes. --- app/models/bulletin_feed.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/models/bulletin_feed.rb b/app/models/bulletin_feed.rb index 15000ad..0d12b43 100644 --- a/app/models/bulletin_feed.rb +++ b/app/models/bulletin_feed.rb @@ -120,10 +120,6 @@ class BulletinFeed cat_ids = announcements.collect{|a| a.category_id.blank? ? nil : a.category_id.to_s}.compact.uniq tag_ids = announcements.collect{|a| a.tag_ids.collect{|v| v.blank? ? nil : v.to_s}}.flatten.compact.uniq tag_names = tag_ids.map{|tag_id| Tag.find(tag_id).name_translations rescue nil}.compact - all_hashtags = announcements.map(&:hashtags).flatten.compact.uniq rescue [] - hashtag_names = all_hashtags.map do |h| - {"name_translations" => h.name_translations} rescue nil - end.compact rescue [] category_titles = cat_ids.map{|cat_id| Category.find(cat_id).title_translations rescue nil}.compact basic_query = {:module => 'announcement',:enabled_for=>I18n.locale} if !cat_ids.blank? @@ -151,8 +147,7 @@ class BulletinFeed anns = { "announcements" => all_anns, "tags" => tag_names, - "categories" => category_titles, - "hashtags" => hashtag_names + "categories" => category_titles }.to_json BulletinFeedCache.where(uid: uid,start: startdt,end: enddt,date: dt).destroy feed_cache = BulletinFeedCache.create(uid: uid,content: anns,start: startdt,end: enddt,date: dt,invalid_date: invalid_date)