Skip to content
Snippets Groups Projects
Commit aa67a3aa authored by Arnaud Levy's avatar Arnaud Levy
Browse files

fix

parent 5aebeecf
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment