diff --git a/app/controllers/admin/research/researchers_controller.rb b/app/controllers/admin/research/researchers_controller.rb index de9b4683d4b83f6d4db46a0e9660b61d6012f7a2..a96265b0cf05169b47da7655f8e677c871546bfd 100644 --- a/app/controllers/admin/research/researchers_controller.rb +++ b/app/controllers/admin/research/researchers_controller.rb @@ -29,7 +29,7 @@ class Admin::Research::ResearchersController < Admin::Research::ApplicationContr ].each do |key| @researcher.update_column key, params[key] if params.has_key?(key) end - @researcher.load_research_publications_without_delay! + @researcher.import_research_publications_from_hal_without_delay! redirect_to admin_research_researcher_path(@researcher) end diff --git a/app/models/research/publication.rb b/app/models/research/publication.rb index 25a95309bed3d39d942e3f508ad92eaa8c6df70d..5100f60a9b90299726a7f1382dd89f322eb43df6 100644 --- a/app/models/research/publication.rb +++ b/app/models/research/publication.rb @@ -49,7 +49,7 @@ class Research::Publication < ApplicationRecord def self.update_from_hal University::Person::Researcher.with_hal_identifier.find_each do |researcher| puts "Loading publications for #{researcher} (#{researcher.university})" - researcher.load_research_publications! + researcher.import_research_publications_from_hal! end end diff --git a/app/models/university/person/with_research.rb b/app/models/university/person/with_research.rb index ab8f52038cec4a1461a5b2bd748683e819f97e80..8292f37dc842d16751e6d9c6e79a6b953ed4fc40 100644 --- a/app/models/university/person/with_research.rb +++ b/app/models/university/person/with_research.rb @@ -15,7 +15,7 @@ module University::Person::WithResearch hal_form_identifier.present? end - def load_research_publications! + def import_research_publications_from_hal! return unless hal_identity? response = HalOpenscience::Document.search "authIdForm_i:#{hal_form_identifier}", fields: ["docid", "title_s", "citationRef_s", "uri_s", "*"], @@ -25,7 +25,7 @@ module University::Person::WithResearch research_publications << publication unless publication.in?(research_publications) end end - handle_asynchronously :load_research_publications! + handle_asynchronously :import_research_publications_from_hal! def possible_hal_authors HalOpenscience::Author.search(to_s, fields: ['*']).results