-
Notifications
You must be signed in to change notification settings - Fork 378
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
fix: check correct state machine when clearing status change ballots #7684
Conversation
ietf/doc/views_ballot.py
Outdated
@@ -403,7 +403,7 @@ def clear_ballot(request, name, ballot_type_slug): | |||
by = request.user.person | |||
if close_ballot(doc, by, ballot_type_slug): | |||
create_ballot_if_not_open(request, doc, by, ballot_type_slug) | |||
if doc.get_state('draft-iesg').slug == 'defer': | |||
if doc.get_state("statchg").slug == "defer": |
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.
This shoul have a guard against doc.get_state()
returning None
. (I think this is the cause of the failing test)
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.
hmm - that just exposes another subtle bug - the check should be against the ballot_type_slug, and if there is no state, the view had best do nothing (404 would be right I think).
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7684 +/- ##
==========================================
- Coverage 88.98% 88.79% -0.20%
==========================================
Files 291 296 +5
Lines 40717 41318 +601
==========================================
+ Hits 36233 36687 +454
- Misses 4484 4631 +147 ☔ View full report in Codecov by Sentry. |
Fixes #7335