Skip to content

LG-16344-passport-validation-patch#12325

Merged
Mawar2 merged 1 commit intomainfrom
mwarren-lg-16344-passport-validation-patch
Jul 14, 2025
Merged

LG-16344-passport-validation-patch#12325
Mawar2 merged 1 commit intomainfrom
mwarren-lg-16344-passport-validation-patch

Conversation

@Mawar2
Copy link
Copy Markdown
Contributor

@Mawar2 Mawar2 commented Jul 9, 2025

🎫 Ticket

Link to the relevant ticket:
LG-16344

🛠 Summary of changes

This PR fixes a crash when a passport document passes initial authentication but fails PII validation.

The issue was that failed_passport_fingerprint was declared inside a conditional block and accessed in a different scope, causing a NameError. I moved the variable declarations outside the conditional blocks to ensure they’re always available.

I added a test case to verify this scenario works without errors. The fix follows the same pattern used elsewhere in the file for similar variable scoping.

📜 Testing Plan

  • Run the specific test case to verify the NameError is fixed: bundle exec rspec spec/forms/idv/api_image_upload_form_spec.rb:1038
  • Run the full test suite for the form: bundle exec rspec spec/forms/idv/api_image_upload_form_spec.rb
  • Verify all existing tests still pass after the variable scope change

@Mawar2 Mawar2 self-assigned this Jul 9, 2025
Copy link
Copy Markdown
Contributor

@solipet solipet left a comment

Choose a reason for hiding this comment

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

LGTM!

@WilliamBirdsall
Copy link
Copy Markdown
Contributor

WilliamBirdsall commented Jul 9, 2025

LGTM as well!

Copy link
Copy Markdown
Contributor

@AShukla-GSA AShukla-GSA left a comment

Choose a reason for hiding this comment

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

LGTM

@Mawar2 Mawar2 force-pushed the mwarren-lg-16344-passport-validation-patch branch from 812dc3f to a409bbd Compare July 10, 2025 22:03
@Mawar2 Mawar2 force-pushed the mwarren-lg-16344-passport-validation-patch branch from a409bbd to e22c592 Compare July 14, 2025 16:25
@Mawar2 Mawar2 merged commit 0e07e16 into main Jul 14, 2025
1 check passed
@Mawar2 Mawar2 deleted the mwarren-lg-16344-passport-validation-patch branch July 14, 2025 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants