FIX: ensures we have a color for reports (#6396)

This commit is contained in:
Joffrey JAFFEUX 2018-09-13 17:36:39 +02:00 committed by GitHub
parent 7bf8b0d305
commit 18fcd483f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,8 +29,10 @@ class Report
@modes = [:table, :chart]
@prev_data = nil
@dates_filtering = true
@primary_color = rgba_color(ColorScheme.hex_for_name('tertiary'))
@secondary_color = rgba_color(ColorScheme.hex_for_name('tertiary'), 0.1)
tertiary = ColorScheme.hex_for_name('tertiary') || '0088cc'
@primary_color = rgba_color(tertiary)
@secondary_color = rgba_color(tertiary, 0.1)
end
def self.cache_key(report)