Ensure services counts always have values in usage pings
This commit is contained in:
parent
d13ae9c260
commit
f5f439f2c9
1 changed files with 1 additions and 1 deletions
|
@ -121,7 +121,7 @@ module Gitlab
|
|||
}
|
||||
|
||||
results = count(Service.unscoped.where(type: types.keys, active: true).group(:type), fallback: Hash.new(-1))
|
||||
results.each_with_object({}) { |(key, value), response| response[types[key.to_sym]] = value }
|
||||
types.each_with_object({}) { |(klass, key), response| response[key] = results[klass.to_s] || 0 }
|
||||
end
|
||||
|
||||
def count(relation, fallback: -1)
|
||||
|
|
Loading…
Reference in a new issue