aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/list_options.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/models/list_options.go b/models/list_options.go
index 0946917fec..62c0944cc8 100644
--- a/models/list_options.go
+++ b/models/list_options.go
@@ -38,7 +38,10 @@ func (opts ListOptions) setEnginePagination(e Engine) Engine {
}
func (opts ListOptions) setDefaultValues() {
- if opts.PageSize <= 0 || opts.PageSize > setting.API.MaxResponseItems {
+ if opts.PageSize <= 0 {
+ opts.PageSize = setting.API.DefaultPagingNum
+ }
+ if opts.PageSize > setting.API.MaxResponseItems {
opts.PageSize = setting.API.MaxResponseItems
}
if opts.Page <= 0 {