X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/64146b4f3614854e6a0f8430f27261fe0a0ca26c..de29e9b3f59d7a06fbe2e32096328bd8a6ed2b3a:/app/controllers/changeset_controller.rb diff --git a/app/controllers/changeset_controller.rb b/app/controllers/changeset_controller.rb index 90b868129..c03ed9056 100644 --- a/app/controllers/changeset_controller.rb +++ b/app/controllers/changeset_controller.rb @@ -582,7 +582,7 @@ class ChangesetController < ApplicationController # Get the maximum number of comments to return def comments_limit if params[:limit] - if params[:limit].to_i > 0 && params[:limit].to_i <= 10000 + if params[:limit].to_i.positive? && params[:limit].to_i <= 10000 params[:limit].to_i else raise OSM::APIBadUserInput, "Comments limit must be between 1 and 10000"