-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't create duplicate Bundle authorization when non-available resources are moved to Bundle #988
Conversation
dc83016
to
28b1c95
Compare
…urces are moved to Bundle
Hi @lalit97! We are having some trouble trying to reproduce this error. Could you please add detailed instructions about how you reproduced this bug and the queries you made to check that
|
I was able to reproduce this bug and added the steps to reproduce it to the Phab task, although it will still be good to know how you reproduced this error in your own words :) |
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.
Thank you for working on this tricky bug fix. I have some initial minor comments,
Hi @suecarmol sure, I will add the steps here soon :) |
First of all, I selected a
Then I created an
Then I changed the partner's
I tried to print all the
The |
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.
Sorry for the long wait on getting this approved. This looks great! Thanks for your help!
No issues at all. Thank you for your words 😀 |
Description
When a partner is moved from an access method to Bundle we do some processing in update_existing_bundle_authorizations to update authorizations accordingly.
When the partner is set to one of the non-available statuses and is moved to Bundle, it creates duplicate Bundle authorizations for users. This shouldn't happen.
Rationale
When the partner is set to one of the non-available statuses and is moved to Bundle in the same operation,
it creates duplicate Bundle authorizations for the user. This should not happen ideally.
Phabricator Ticket
https://phabricator.wikimedia.org/T302882
How Has This Been Tested?
I have tested it by moving a partner from
available
towaitlist
and setting itsauthorization_method
toBundle
in the same query. Later checked that it does not have duplicate Authorizations in the DB.Screenshots of your changes (if appropriate):
Types of changes
What types of changes does your code introduce? Add an
x
in all the boxes that apply: