diff --git a/app/models/chargeback_rate.rb b/app/models/chargeback_rate.rb index f327fe760f5..2c2d9ef6097 100644 --- a/app/models/chargeback_rate.rb +++ b/app/models/chargeback_rate.rb @@ -132,6 +132,10 @@ def assigned_tags? get_assigned_tos[:tags].present? end + def default? + super || description == 'Default Container Image Rate' + end + ########################################################### private @@ -150,7 +154,7 @@ def ensure_unassigned end def ensure_nondefault - if default? || description == 'Default Container Image Rate' + if default? errors.add(:rate, "default rate cannot be deleted") throw :abort end