GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit f5f439f2 authored by Sean McGivern's avatar Sean McGivern

Ensure services counts always have values in usage pings

parent d13ae9c2
......@@ -121,7 +121,7 @@ def services_usage
}
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)
......
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