From a27d1818f54acad670d35ab3d0d3b53e99a1086b Mon Sep 17 00:00:00 2001 From: chiu Date: Sat, 14 Aug 2021 16:17:59 +0800 Subject: [PATCH] fix error --- app/models/bulletin_feed.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/bulletin_feed.rb b/app/models/bulletin_feed.rb index bcea409..f3d9631 100644 --- a/app/models/bulletin_feed.rb +++ b/app/models/bulletin_feed.rb @@ -55,7 +55,7 @@ class BulletinFeed tags = bf.tag_ids categories = bf.category_ids if !(categories.empty? && tags.empty?) - anns_before_filter = Bulletin.any_of([{"title.en"=>{"$nin"=>["", nil]}},{"title.zh_tw"=>{"$nin"=>["", nil]}}]).is_approved_and_show + anns_before_filter = Bulletin.any_of(I18n.available_locales.map{|v| {"title.#{v}"=>{"$nin"=>["", nil]}}}).is_approved_and_show if !dt.nil? dt = DateTime.parse(dt) dtt = dt + 1.day