Commit 57ef0dcb authored by Jan Provaznik's avatar Jan Provaznik Committed by Sean McGivern

Added clarification comment to the count_key

parent bec1492c
...@@ -385,6 +385,9 @@ class IssuableFinder ...@@ -385,6 +385,9 @@ class IssuableFinder
end end
def count_key(value) 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 value = Array(value).last
klass.available_states.key(value) klass.available_states.key(value)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment