diff --git a/app/models/time_profile.rb b/app/models/time_profile.rb index 6ddbc001a62..5fbd21d465b 100644 --- a/app/models/time_profile.rb +++ b/app/models/time_profile.rb @@ -4,8 +4,6 @@ class TimeProfile < ApplicationRecord DEFAULT_TZ = "UTC".freeze serialize :profile - default_value_for :days, ALL_DAYS - default_value_for :hours, ALL_HOURS has_many :miq_reports has_many :metric_rollups @@ -75,7 +73,7 @@ def tz_or_default(default_tz = DEFAULT_TZ) end def days - profile[:days] + profile.fetch(:days, ALL_DAYS) end def days=(arr) @@ -85,7 +83,7 @@ def days=(arr) end def hours - profile[:hours] + profile.fetch(:hours, ALL_HOURS) end def hours=(arr)