Skip to content

Commit

Permalink
Fix list_options GetStartEnd (go-gitea#16303)
Browse files Browse the repository at this point in the history
end is start + pageSize and not start + page
  • Loading branch information
sebastian-sauer authored and AbdulrhmnGhanem committed Aug 10, 2021
1 parent 0e31fce commit fe53c3e
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 fe53c3e

Please sign in to comment.