Skip to content

Commit

Permalink
never show all prefix totals. datacite/datacite#359
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Nov 22, 2019
1 parent 92312ca commit ba7e631
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/prefixes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ def update
end

def totals
return [] unless params[:client_id].present?

page = { size: 0, number: 1}
response = Doi.query(nil, client_id: params[:client_id], state: "findable,registered", page: page, totals_agg: "prefix")
registrant = prefixes_totals(response.response.aggregations.prefixes_totals.buckets)
Expand Down

0 comments on commit ba7e631

Please sign in to comment.