Browse Source

Fix list_options GetStartEnd (#16303)

end is start + pageSize and not start + page
master
sebastian-sauer 1 year ago
committed by GitHub
parent
commit
e8c6cead0f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      models/list_options.go

2
models/list_options.go

@ -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