We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8684090 commit 26bb724Copy full SHA for 26bb724
models/list_options.go
@@ -38,7 +38,10 @@ func (opts ListOptions) setEnginePagination(e Engine) Engine {
38
}
39
40
func (opts ListOptions) setDefaultValues() {
41
- if opts.PageSize <= 0 || opts.PageSize > setting.API.MaxResponseItems {
+ if opts.PageSize <= 0 {
42
+ opts.PageSize = setting.API.DefaultPagingNum
43
+ }
44
+ if opts.PageSize > setting.API.MaxResponseItems {
45
opts.PageSize = setting.API.MaxResponseItems
46
47
if opts.Page <= 0 {
0 commit comments