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

fix

parent 6d8c34a1
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
@researcher.load_research_publications!
redirect_to admin_research_researcher_path(@researcher)
end
......
......@@ -47,7 +47,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.load_research_publications!
end
end
......
......@@ -15,7 +15,7 @@ module University::Person::WithResearch
hal_form_identifier.present?
end
def load_research_publications
def load_research_publications!
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 :load_research_publications!
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