-
Notifications
You must be signed in to change notification settings - Fork 541
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
Correct PromotedGroup Approvals #23218
Correct PromotedGroup Approvals #23218
Conversation
fb90f91
to
8bfac47
Compare
89bf69f
to
d4e160e
Compare
@@ -123,6 +123,7 @@ def bump_addon_version(old_version): | |||
addon = old_version.addon | |||
old_file_obj = old_version.file | |||
promoted_group = addon.promoted_groups(currently_approved=True) | |||
carryover = promoted_group and any(promoted_group.listed_pre_review) |
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.
Is there a tangible benefit here? If not, just remove the diff.
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.
The code shortly after this makes changes to the current_version
of the addon, which, given the lazy evaluation of querysets, affects the result of promoted_group
(namely, it loses access to the promotion).
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.
Is there a test covering this? Seems not since you could change the code without any failure. Please add a test for that behavior.
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.
Basic verification is passing for me. I'd like some better test instructions
- how to test for different types of badges
- how to verify results
- include before/after screenshots
Additionally I would like some more unit tests on the PromotedGroup model methods. Other than that looks good.
5867f73
to
2d31c11
Compare
Fixes: mozilla/addons#15487
Description
Fixes the logic relating to retrieving approved promotions for an add-on.
Testing
Note: Expected promotions are in the promotedaddon admin.
/manage.py sync_promoted_addons
.Checklist
#ISSUENUM
at the top of your PR to an existing open issue in the mozilla/addons repository.