Describe the bug
Before I let the Robots take over, @jonafato reported this, and I found a second bug while exploring it. Back to the robots...
While an election's nomination window is still open, the nominee list shows you the nominations of you, not the nominations you made for other people. It is also not scoped to the election in the URL, so it mixes in nominees from every past election cycle.
The page tells you it is doing something else. The template prints "Nominations close at ..., this is a preview of only nominations relevant to you."
The cause is in NomineeList.get_queryset (apps/nominations/views.py):
if self.request.user.is_authenticated:
return Nominee.objects.filter(user=self.request.user)
Nominee.user is the person being nominated, so this returns the rows where you are the candidate. The branch above it filters on election=election; this one does not.
There is a second, related problem. Each row in the list links to NomineeDetail, which 404s unless Nominee.visible() passes. visible() (apps/nominations/models.py) returns True only for staff, for the nominee themselves, or after nominations close. So even once the list shows the people you nominated, a non-staff nominator who clicks one of those links gets a 404 during the open window.
NomineeList has no test, which is likely why this went unnoticed.
To Reproduce
- Sign in as an ordinary (non-staff) user.
- Have that user submit a nomination for somebody else in an election whose nomination window is open.
- Go to
/nominations/elections/<election-slug>/nominees/.
- The person you nominated is absent. Any election in which somebody nominated you, including closed past elections, is present.
Expected behavior
While nominations are open, the list should show the nominees relevant to you in the election named in the URL. That means the people you nominated, plus your own candidacy if somebody nominated you. Nominees from other election cycles should not appear. Following a link from that list to a nominee you nominated should open the nominee page rather than a 404.
URL to the issue
https://www.python.org/nominations/elections/2026-python-packaging-council/nominees/
Screenshots
""
Browsers
Other
Operating System
Other
Browser Version
No response
Relevant log output
Additional context
This is server-side queryset logic, so it does not depend on the browser or the operating system.
Describe the bug
Before I let the Robots take over, @jonafato reported this, and I found a second bug while exploring it. Back to the robots...
While an election's nomination window is still open, the nominee list shows you the nominations of you, not the nominations you made for other people. It is also not scoped to the election in the URL, so it mixes in nominees from every past election cycle.
The page tells you it is doing something else. The template prints "Nominations close at ..., this is a preview of only nominations relevant to you."
The cause is in
NomineeList.get_queryset(apps/nominations/views.py):Nominee.useris the person being nominated, so this returns the rows where you are the candidate. The branch above it filters onelection=election; this one does not.There is a second, related problem. Each row in the list links to
NomineeDetail, which 404s unlessNominee.visible()passes.visible()(apps/nominations/models.py) returns True only for staff, for the nominee themselves, or after nominations close. So even once the list shows the people you nominated, a non-staff nominator who clicks one of those links gets a 404 during the open window.NomineeListhas no test, which is likely why this went unnoticed.To Reproduce
/nominations/elections/<election-slug>/nominees/.Expected behavior
While nominations are open, the list should show the nominees relevant to you in the election named in the URL. That means the people you nominated, plus your own candidacy if somebody nominated you. Nominees from other election cycles should not appear. Following a link from that list to a nominee you nominated should open the nominee page rather than a 404.
URL to the issue
https://www.python.org/nominations/elections/2026-python-packaging-council/nominees/
Screenshots
""Browsers
Other
Operating System
Other
Browser Version
No response
Relevant log output
Additional context
This is server-side queryset logic, so it does not depend on the browser or the operating system.