LG-10121 remove verified_at from users who have not finished verification.#8873
Merged
LG-10121 remove verified_at from users who have not finished verification.#8873
Conversation
This is the rake task for ROLL-0017.
changelog: Bug Fixes, IdV, Remove verified_at from users who have not finished verification
| 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') |
Contributor
There was a problem hiding this comment.
Do we need to check for in person pending profiles as well?
Contributor
Author
There was a problem hiding this comment.
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" |
Contributor
There was a problem hiding this comment.
Looks like this should be outside the map loop?
| # Usage: | ||
| # | ||
| # Print errant profiles | ||
| # bundle exec rake profiles:remove_errant_verified_at _from_profiles |
Contributor
There was a problem hiding this comment.
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 |
Contributor
Author
There was a problem hiding this comment.
find and replace failed me :(
soniaconnolly
approved these changes
Jul 26, 2023
Contributor
soniaconnolly
left a comment
There was a problem hiding this comment.
LGTM, one more typo.
| # Usage: | ||
| # | ||
| # Print errant profiles | ||
| # bundle exec rake profiles:remove_verified_at_from_non_verified_profiles_profiles |
Contributor
There was a problem hiding this comment.
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 |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎫 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.