From 5c8f822993e11acf42bb5aad5c2fda00ad454586 Mon Sep 17 00:00:00 2001 From: thomaschen <99703040@nccu.edu.tw> Date: Tue, 18 Feb 2014 13:57:57 +0800 Subject: [PATCH] fix duplicated announcement when rss feed --- lib/rss_ntu_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rss_ntu_job.rb b/lib/rss_ntu_job.rb index d7126a1..e3a9b48 100644 --- a/lib/rss_ntu_job.rb +++ b/lib/rss_ntu_job.rb @@ -84,7 +84,7 @@ recent_feed.each do |title, bulletin| categories, coll_bulletin, coll_cat = get_mongo_and_categories category_id, categories = get_category_id(bulletin[:category], categories, coll_cat) - unless coll_bulletin.find_one(rss_link: bulletin[:link]) + unless coll_bulletin.find_one(title: {:zh_tw => title, :en => ""}) bulletin = { _type: "Bulletin", postdate: bulletin[:date], created_at: bulletin[:date],