diff options
Diffstat (limited to 'app/finders/issuable_finder.rb')
-rw-r--r-- | app/finders/issuable_finder.rb | 3 |
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 |