Skip to content

Commit

Permalink
correct filter for person events
Browse files Browse the repository at this point in the history
  • Loading branch information
kjgarza committed Feb 3, 2020
1 parent e437c61 commit d92aa60
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions app/controllers/concerns/metrics_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,11 @@ def get_person_metrics(orcid)
end

def get_person_dois(orcid)
Event.query(nil, page: { size: 500 }, obj_id: https_to_http(orcid)).results.to_a.map do |e|
Event.query(nil, page: { size: 300 }, source_id: "datacite-orcid-auto-update", obj_id: "https://orcid.org/#{orcid}").results.to_a.map do |e|
doi_from_url(e.subj_id)
end
end

def https_to_http(url)
orcid = orcid_from_url(url)
return nil if orcid.blank?

"https://orcid.org/#{orcid}"
end

def mix_in_metrics_array(metadata_array_objects, metrics_array_hashes)
return [] if metadata_array_objects.empty?

Expand Down

0 comments on commit d92aa60

Please sign in to comment.