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)