diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-11-17 19:27:38 +0300 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2017-11-20 13:20:02 +0300 |
commit | 17fe8174a27e8fb5f5f4bbfce0be454bea943bf3 (patch) | |
tree | 20024420503192766a97d3428f130effafd26340 /lib | |
parent | dc18038a37347e77f037bd3712296f91daaef859 (diff) |
Merge branch 'bvl-fix-count-with-selects' into 'master'
Remove the selects when counting the last page
Closes #40266
See merge request gitlab-org/gitlab-ce!15456
(cherry picked from commit c406824d319e5b1a073af7cf55c3f24bfa66e2a4)
5a335c4d Remove the selects when counting the last page
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/multi_collection_paginator.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/multi_collection_paginator.rb b/lib/gitlab/multi_collection_paginator.rb index eb3c9002710..c22d0a84860 100644 --- a/lib/gitlab/multi_collection_paginator.rb +++ b/lib/gitlab/multi_collection_paginator.rb @@ -55,7 +55,9 @@ module Gitlab def first_collection_last_page_size return @first_collection_last_page_size if defined?(@first_collection_last_page_size) - @first_collection_last_page_size = paginated_first_collection(first_collection_page_count).count + @first_collection_last_page_size = paginated_first_collection(first_collection_page_count) + .except(:select) + .size end end end |