From e8c6cead0fb926ced6595c7b22f56b1cc2540435 Mon Sep 17 00:00:00 2001
From: sebastian-sauer <sauer.sebastian@gmail.com>
Date: Tue, 29 Jun 2021 23:42:23 +0200
Subject: [PATCH] Fix list_options GetStartEnd (#16303)

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 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
 }