From 76c66df16c1170670b712ec4edddfa55d8dd9c11 Mon Sep 17 00:00:00 2001 From: Sebastian Sauer Date: Tue, 29 Jun 2021 22:36:24 +0200 Subject: [PATCH] Fix list_options GetStartEnd end is start + pageSize and not start + page --- 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 9cccd05465afe..ff02933f9bac4 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 }