Skip to content

Commit

Permalink
Fix list_options GetStartEnd (#16303) (#16305)
Browse files Browse the repository at this point in the history
end is start + pageSize and not start + page

Co-authored-by: sebastian-sauer <sauer.sebastian@gmail.com>
  • Loading branch information
6543 and sebastian-sauer authored Jun 29, 2021
1 parent c7db743 commit 50084da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/list_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 50084da

Please sign in to comment.