diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index cd73793aa..717179a1f 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -657,7 +657,8 @@ def api_offset_and_limit(options=params) limit = options[:limit].to_i if limit < 1 limit = 25 - elsif limit > Setting.api_limit.to_i + end + if limit > Setting.api_limit.to_i limit = Setting.api_limit.to_i end if offset.nil? && options[:page].present?