diff --git a/app/controllers/concerns/metrics_helper.rb b/app/controllers/concerns/metrics_helper.rb index c2701a33d..ec71c1b98 100644 --- a/app/controllers/concerns/metrics_helper.rb +++ b/app/controllers/concerns/metrics_helper.rb @@ -11,6 +11,10 @@ def get_metrics_array(dois) end def get_person_metrics(orcid) + if orcid.blank? + return { citations: 0, views: 0, downloads: 0 } + end + dois = get_person_dois(orcid).join(",") usage = EventsQuery.new.views_and_downloads(dois) {