diff options
author | sebastian-sauer <sauer.sebastian@gmail.com> | 2021-06-29 23:42:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-29 22:42:23 +0100 |
commit | e8c6cead0fb926ced6595c7b22f56b1cc2540435 (patch) | |
tree | 7a2ddd80e63986eccbc0a008fac66f8c5193be11 /models | |
parent | dea7a5c5b9fa7eea331159020268f8898a0a678d (diff) | |
download | gitea-e8c6cead0fb926ced6595c7b22f56b1cc2540435.tar.gz gitea-e8c6cead0fb926ced6595c7b22f56b1cc2540435.zip |
Fix list_options GetStartEnd (#16303)
end is start + pageSize and not start + page
Diffstat (limited to 'models')
-rw-r--r-- | models/list_options.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/list_options.go b/models/list_options.go index 9cccd05465..ff02933f9b 100644 --- a/models/list_options.go +++ b/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 } |