aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author65432021-06-30 01:23:24 +0200
committerGitHub2021-06-30 00:23:24 +0100
commit50084daa4c21a8a539d1ac12351e24cdf33ff899 (patch)
tree1569f29073682f6eb034379f1cc24adc306cfdb7
parentc7db7438b7ba486d3cfc02cb032bfeb8946b76af (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.go2
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
}