diff --git a/app/models/accrediting_provider_enrichment.rb b/app/models/accrediting_provider_enrichment.rb index 4962e4b6bb..94eccb9601 100644 --- a/app/models/accrediting_provider_enrichment.rb +++ b/app/models/accrediting_provider_enrichment.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true class AccreditingProviderEnrichment - include ActiveModel::Validations include ActiveModel::Model # Pascal cased as the original is stored like so. @@ -9,10 +8,8 @@ class AccreditingProviderEnrichment validates :Description, words_count: { maximum: 100 } - def initialize(attrs) - attrs.each do |attr, value| - send("#{attr}=", value) unless attr == 'errors' - end + def initialize(attributes = {}) + super(attributes.slice('UcasProviderCode', 'Description')) end class ArraySerializer