Commit 8d847b89d25951b57d843676bf9207f22c12597e
1 parent
135418dc
Exists in
master
and in
4 other branches
API: fix commits pagination
closes #2300
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/api/projects.rb
... | ... | @@ -292,7 +292,7 @@ module Gitlab |
292 | 292 | authorize! :download_code, user_project |
293 | 293 | |
294 | 294 | page = params[:page] || 0 |
295 | - per_page = params[:per_page] || 20 | |
295 | + per_page = params[:per_page].to_i || 20 | |
296 | 296 | ref = params[:ref_name] || user_project.try(:default_branch) || 'master' |
297 | 297 | |
298 | 298 | commits = user_project.repository.commits(ref, nil, per_page, page * per_page) | ... | ... |