Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/models/profile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why dont we just run a schema to delete duplicate profile confirmations, we arent referencing it anywhere else and dont use that table anymore anyways.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main reason: The metrics computability meeting that is scheduled for Aug 5 may indicate that we need this table (or something similar)

Also, this PR is already here - #12317, waiting on #12326 to be completed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay! cool thanks


validates :active, uniqueness: { scope: :user_id, if: :active? }

Expand Down
4 changes: 1 addition & 3 deletions app/services/idv/duplicate_ssn_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions spec/jobs/resolution_proofing_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down