diff --git a/enterprise/app/models/enterprise/account.rb b/enterprise/app/models/enterprise/account.rb index a19640670..3aa9c35a8 100644 --- a/enterprise/app/models/enterprise/account.rb +++ b/enterprise/app/models/enterprise/account.rb @@ -1,10 +1,6 @@ module Enterprise::Account extend ActiveSupport::Concern - included do - has_one :saml_settings, class_name: 'AccountSamlSettings', dependent: :destroy - end - # TODO: Remove this when we upgrade administrate gem to the latest version # this is a temporary method since current administrate doesn't support virtual attributes def manually_managed_features; end @@ -23,6 +19,6 @@ module Enterprise::Account end def saml_enabled? - saml_settings&.saml_enabled? || false + AccountSamlSettings.find_by(account: self)&.saml_enabled? || false end end