Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/finders/issuable_finder.rb')
-rw-r--r--app/finders/issuable_finder.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index 0005206970b..dfddd32d7df 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -385,6 +385,9 @@ class IssuableFinder
end
def count_key(value)
+ # value may be an array if the finder used in `count_by_state` added an
+ # additional `group by`. Anyway we are sure that state will be always the
+ # last item because it's added as the last one to the query.
value = Array(value).last
klass.available_states.key(value)
end