Skip to content

Commit

Permalink
Fixes #37587 - ensure page and per_page are integers
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylenz committed Aug 30, 2024
1 parent c2146ec commit d3169e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/katello/api/v2/api_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ def scoped_search(query, default_sort_by, default_sort_order, options = {})
else
query = query.paginate(paginate_options)
end
page = params[:page] || 1
per_page = params[:per_page] || Setting[:entries_per_page]
page = (params[:page].presence || 1).to_i
per_page = params[:per_page].to_i || Setting[:entries_per_page]
query = (total.zero? || subtotal.zero?) ? blank_query : query

if options[:csv]
Expand Down

0 comments on commit d3169e1

Please sign in to comment.