-
Notifications
You must be signed in to change notification settings - Fork 50
Add back and correct "resendoauthverification" command #779
Add back and correct "resendoauthverification" command #779
Conversation
This reverts commit c7ed810.
API Developer Docs Preview: Ready https://wordpress.github.io/openverse-api/_preview/779 Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again. You can check the GitHub pages deployment action list to see the current status of the deployments. |
7094db5
to
8e2d161
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! The copy is good, thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran the dry
version first and then the one with the --no-dry_run
flag and I got different outputs. Is this expected?
Running just dj resendoauthverification
:
The following applications had email verifications sent.
Application name: My test project
Cleaned related application count: 3
Cleaned related verification count: 3
Cleaned related registration count: 3
Application name: My test project2
Cleaned related application count: 0
Cleaned related verification count: 0
Cleaned related registration count: 0
Application name: My test project3
Cleaned related application count: 1
Cleaned related verification count: 1
Cleaned related registration count: 1
The above was a dry run and no records were actually affected.
Running just dj resendoauthverification --no-dry_run
:
The following applications had email verifications sent.
Application name: My test project
Cleaned related application count: 3
Cleaned related verification count: 0
Cleaned related registration count: 3
Application name: My test project2
Cleaned related application count: 0
Cleaned related verification count: 0
Cleaned related registration count: 0
Application name: My test project3
Cleaned related application count: 1
Cleaned related verification count: 0
Cleaned related registration count: 1
I verified the link sent in the email and it works. It would be nice to see a unit test for it since the actual error was there. I'm less concerned as this has been already run in production, so approving to unblock.
I do not know why that discrepancy exists. Reading through the code it doesn't seem like it should, the counts for each thing happen independent of the deletions and deleting one thing or another doesn't make the verifications query work different, at least not in any way that is evident to me by reading the code...
I started to add a unit test that actually made a request with the URL... but I wasn't sure how to do that without having to spin up an API 🤔 If we use the RequestFactory approach it wouldn't really be all that useful, I don't think. We could assert in a regex or something that there are no double |
That sounds good! |
ae17d9e
to
c645f74
Compare
Added the unit test. If you put back the extra |
Fixes #770 by @zackkrida
Description
Corrects the email. I took a shot at the text of the corrected email but please feel free to offer better wording if you can think of any!
Testing instructions
Follow instructions from the original PR for testing locally: #694
Note also that CI should pass.