Skip to content

LG-10121 remove verified_at from users who have not finished verification.#8873

Merged
theabrad merged 5 commits intomainfrom
abrad-lg-10121-errant-verified-at
Jul 27, 2023
Merged

LG-10121 remove verified_at from users who have not finished verification.#8873
theabrad merged 5 commits intomainfrom
abrad-lg-10121-errant-verified-at

Conversation

@theabrad
Copy link
Contributor

🎫 Ticket

LG-10121

🛠 Summary of changes

You can see the in-depth roll plan for this in ROLL-0017

We found out that there were profiles that had the verified_at field populated when they shouldn’t. These profiles still had a gpo_verification_pending_at or fraud_review_pending_at timestamp meaning that they haven’t completed verification yet. This roll plan removes the verified_at attribute from those profiles.

theabrad added 2 commits July 26, 2023 15:03
changelog: Bug Fixes, IdV, Remove verified_at from users who have not
finished verification
@theabrad theabrad requested a review from a team July 26, 2023 19:47
update_profiles = ENV['UPDATE_PROFILES'] == 'true'

profiles = Profile.where('verified_at IS NOT NULL').
where('fraud_review_pending_at IS NOT NULL OR gpo_verification_pending_at IS NOT NULL')
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to check for in person pending profiles as well?

Copy link
Contributor Author

@theabrad theabrad Jul 26, 2023

Choose a reason for hiding this comment

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

If I recall correctly, we checked that and didn't see any in_person profiles that were in that state. I don't think verified_at was set with an in_person deactivation reason. I just checked now in prod and didn't see any that fit that criteria.

profiles.split("\n").map do |profile_row|
profile_id, profile_verified_at = profile_row.split(',', 2)

warn "Updating #{profiles.count} records"
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this should be outside the map loop?

# Usage:
#
# Print errant profiles
# bundle exec rake profiles:remove_errant_verified_at _from_profiles
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the task name changed. Same on line 11.

Suggested change
# bundle exec rake profiles:remove_errant_verified_at _from_profiles
# bundle exec rake profiles:remove_verified_at_from_non_verified_profiles

Copy link
Contributor Author

Choose a reason for hiding this comment

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

find and replace failed me :(

Copy link
Contributor

@soniaconnolly soniaconnolly left a comment

Choose a reason for hiding this comment

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

LGTM, one more typo.

# Usage:
#
# Print errant profiles
# bundle exec rake profiles:remove_verified_at_from_non_verified_profiles_profiles
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# bundle exec rake profiles:remove_verified_at_from_non_verified_profiles_profiles
# bundle exec rake profiles:remove_verified_at_from_non_verified_profiles

@theabrad theabrad merged commit 40d3599 into main Jul 27, 2023
@theabrad theabrad deleted the abrad-lg-10121-errant-verified-at branch July 27, 2023 13:33
@amirbey amirbey mentioned this pull request Jul 27, 2023
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.

2 participants