From 00897951b17fd1e5e1b686ca6a83a7961b37dc72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Wed, 24 Jan 2024 00:15:20 +0800 Subject: [PATCH] Fix bug. --- lib/tasks/sync_fgu_personal_data_tasks.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/sync_fgu_personal_data_tasks.rake b/lib/tasks/sync_fgu_personal_data_tasks.rake index 5f21026..c1e71df 100644 --- a/lib/tasks/sync_fgu_personal_data_tasks.rake +++ b/lib/tasks/sync_fgu_personal_data_tasks.rake @@ -432,7 +432,7 @@ module FguSyncPlugin act = Activity.where(:rss2_id => rss2_id).first act_data = {:rss2_id => rss2_id, :publish_date => publish_date, :updated_at => updated_at, :start_date => start_date, :end_date => end_date, :activity_name_translations => activity_name, :work_title_translations => work_title, :activity_organizer_translations => activity_organizer, :activity_co_organizer_translations => activity_co_organizer, :region_translations => region, :road_show_translations => road_show, :tour_details_translations => tour_details, :award_name_translations => award_name, :awarding_unit_translations => awarding_unit, :authors_type_translations => authors_type, :authors_translations => authors, :year => year, :member_profile => mp} if act.nil? - act = Activity.new(act_data) + act = Activity.create(act_data) puts "Saving new Activity." else act.update_attributes(act_data)