diff --git a/app/controllers/dois_controller.rb b/app/controllers/dois_controller.rb index 460f6f2db..b41c49ee5 100644 --- a/app/controllers/dois_controller.rb +++ b/app/controllers/dois_controller.rb @@ -50,7 +50,7 @@ def index end total = response.results.total - total_pages = page[:size] > 0 ? (total.to_f / page[:size]).ceil : 0 + total_pages = page[:size] > 0 ? ([total.to_f, 10000].min / page[:size]).ceil : 0 states = total > 0 ? facet_by_key(response.response.aggregations.states.buckets) : nil resource_types = total > 0 ? facet_by_resource_type(response.response.aggregations.resource_types.buckets) : nil