diff --git a/app/models/profile.rb b/app/models/profile.rb index b6dc89b7d37..0bbe5519995 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -16,6 +16,7 @@ class Profile < ApplicationRecord # rubocop:enable Rails/InverseOf has_many :gpo_confirmation_codes, dependent: :destroy has_one :in_person_enrollment, dependent: :destroy + has_many :duplicate_profile_confirmations, dependent: :destroy validates :active, uniqueness: { scope: :user_id, if: :active? } diff --git a/app/services/idv/duplicate_ssn_finder.rb b/app/services/idv/duplicate_ssn_finder.rb index 324e69494f7..09577302584 100644 --- a/app/services/idv/duplicate_ssn_finder.rb +++ b/app/services/idv/duplicate_ssn_finder.rb @@ -10,9 +10,7 @@ def initialize(user:, ssn:) end def ssn_is_unique? - Profile.where(ssn_signature: ssn_signatures) - .where(initiating_service_provider_issuer: sp_eligible_for_one_account) - .where.not(user_id: user.id).empty? + Profile.where(ssn_signature: ssn_signatures).where.not(user_id: user.id).empty? end def associated_facial_match_profiles_with_ssn diff --git a/spec/jobs/resolution_proofing_job_spec.rb b/spec/jobs/resolution_proofing_job_spec.rb index 671bc1e808b..b0849788565 100644 --- a/spec/jobs/resolution_proofing_job_spec.rb +++ b/spec/jobs/resolution_proofing_job_spec.rb @@ -62,9 +62,7 @@ context 'when the SSN is not unique' do before do - allow(IdentityConfig.store).to receive(:eligible_one_account_providers) - .and_return([OidcAuthHelper::OIDC_FACIAL_MATCH_ISSUER]) - create(:profile, :facial_match_proof, pii: Idp::Constants::MOCK_IDV_APPLICANT_WITH_SSN) + create(:profile, pii: Idp::Constants::MOCK_IDV_APPLICANT_WITH_SSN) end it 'sets ssn_is_unique: false on the result' do