Browse Source

Fix list_options GetStartEnd (#16303)

end is start + pageSize and not start + page
tags/v1.15.0-rc1
sebastian-sauer 2 years ago
parent
commit
e8c6cead0f
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      models/list_options.go

+ 1
- 1
models/list_options.go View File

@@ -41,7 +41,7 @@ func (opts *ListOptions) setEnginePagination(e Engine) Engine {
func (opts *ListOptions) GetStartEnd() (start, end int) {
opts.setDefaultValues()
start = (opts.Page - 1) * opts.PageSize
end = start + opts.Page
end = start + opts.PageSize
return
}


Loading…
Cancel
Save