diff options
author | 6543 | 2021-06-30 01:23:24 +0200 |
---|---|---|
committer | GitHub | 2021-06-30 00:23:24 +0100 |
commit | 50084daa4c21a8a539d1ac12351e24cdf33ff899 (patch) | |
tree | 1569f29073682f6eb034379f1cc24adc306cfdb7 | |
parent | c7db7438b7ba486d3cfc02cb032bfeb8946b76af (diff) |
Fix list_options GetStartEnd (#16303) (#16305)
end is start + pageSize and not start + page
Co-authored-by: sebastian-sauer <sauer.sebastian@gmail.com>
-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 9cccd0546..ff02933f9 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 } |