diff --git a/app/models/entitlement.rb b/app/models/entitlement.rb index e3c9ab7599d2..7a094e65d391 100644 --- a/app/models/entitlement.rb +++ b/app/models/entitlement.rb @@ -7,6 +7,8 @@ class Entitlement < ApplicationRecord validate :one_kind_of_managed_filter + virtual_delegate :name, :to => :miq_user_role, :allow_nil => true, :prefix => true + def self.valid_filters?(filters_hash) return true unless filters_hash # nil ok return false unless filters_hash.kind_of?(Hash) # must be Hash diff --git a/app/models/miq_group.rb b/app/models/miq_group.rb index 78e018313eca..d0bc8beccc0c 100644 --- a/app/models/miq_group.rb +++ b/app/models/miq_group.rb @@ -15,7 +15,7 @@ class MiqGroup < ApplicationRecord has_many :miq_widget_sets, :as => :owner, :dependent => :destroy has_many :miq_product_features, :through => :miq_user_role - virtual_delegate :name, :to => :miq_user_role, :allow_nil => true, :prefix => true + virtual_delegate :miq_user_role_name, :to => :entitlement, :allow_nil => true virtual_column :read_only, :type => :boolean virtual_has_one :sui_product_features, :class_name => "Array"