From 50084daa4c21a8a539d1ac12351e24cdf33ff899 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 30 Jun 2021 01:23:24 +0200 Subject: [PATCH] Fix list_options GetStartEnd (#16303) (#16305) end is start + pageSize and not start + page Co-authored-by: sebastian-sauer --- models/list_options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }