From 8ac2054a00d7f0f60a8c3a4bec7b5227848436b1 Mon Sep 17 00:00:00 2001 From: Bohung Date: Tue, 11 Jan 2022 08:55:44 +0800 Subject: [PATCH] Fix bug. --- lib/tasks/sync_asia_personal_data_tasks.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/sync_asia_personal_data_tasks.rake b/lib/tasks/sync_asia_personal_data_tasks.rake index 0333e89..7c539f6 100644 --- a/lib/tasks/sync_asia_personal_data_tasks.rake +++ b/lib/tasks/sync_asia_personal_data_tasks.rake @@ -202,7 +202,7 @@ module AsiaSyncPlugin hn = Honor.new if hn.nil? hn.rss2_id = honor["ukey"] hn.award_name_translations = localize_data(honor["Award_name"]) #獎項名稱 - hn.awarding_unit_translations = localize_data(honor["Award_unit"][0].to_s.gsub("授獎單位:","").strip) #頒獎單位 + hn.awarding_unit_translations = localize_data(honor["Award_unit"].to_s.gsub("授獎單位:","").strip) #頒獎單位 hn.award_date = DateTime.parse(honor["Award_Date"].gsub('.','/')) rescue nil #獲獎日期 hn.member_profile_id = user.member_profile_id puts "Honor(Award) #{hn.id} saved" if hn.save