Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Bug: Nominee list shows nominations of you, not nominations you made, and ignores the election

オープン
#3,094 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@jefftriplett がすでに取り組んでいます。

2026年8月14日 から。

  • #3095 @jefftriplett による — オープン
  • #3099 @Parzival235 による — マージされずにクローズ

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
74/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

apps/nominations/views.py の NomineeList.get_queryset と apps/nominations/models.py の Nominee.visible() から始め、次に選挙候補者 URL から NomineeDetail リンクをたどってください。選挙が開かれている間の通常のユーザーについて、選挙のスコープと候補者リンクを含むカバレッジを追加してください。完了とは、リストに URL の選挙に関連する候補者だけが表示され、それらのリンクが 404 にならなくなることです。

索引モデルが issue の本文から書いたものです。

説明

bug
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
  1. Sign in as an ordinary (non-staff) user.
  2. Have that user submit a nomination for somebody else in an election whose nomination window is open.
  3. Go to /nominations/elections/<election-slug>/nominees/.
  4. 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
"![SCREENSHOT_DESCRIPTION](SCREENSHOT_LINK.png)"
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.

主要言語
Python
スター
1.7k
フォーク
702
平均マージ
2日 4時間
マージ済み PR(30日)
18

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

python/pythondotorg のほかの issue

python/pythondotorg の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。