From 87505a9464a2c2c9d16547e06b0c922518dea73c Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Tue, 14 Sep 2021 19:48:27 +0200 Subject: Add `AbsoluteListOptions` (#17028) This PR adds a `ListOptions` type which is not paged but uses absolute values. It is implemented as discussed in Discord. Extracted from #16510 to clean that PR. --- models/issue_stopwatch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'models/issue_stopwatch.go') diff --git a/models/issue_stopwatch.go b/models/issue_stopwatch.go index 9322e26bf2..b3022cfc27 100644 --- a/models/issue_stopwatch.go +++ b/models/issue_stopwatch.go @@ -45,7 +45,7 @@ func GetUserStopwatches(userID int64, listOptions ListOptions) ([]*Stopwatch, er sws := make([]*Stopwatch, 0, 8) sess := x.Where("stopwatch.user_id = ?", userID) if listOptions.Page != 0 { - sess = listOptions.setSessionPagination(sess) + sess = setSessionPagination(sess, &listOptions) } err := sess.Find(&sws) -- cgit v1.2.3