Skip to content

Commit d8c546e

Browse files
committed
Cap ballots at latest ballot initation in active_ballot_positions
- Legacy-Id: 3896
1 parent 75cc909 commit d8c546e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

ietf/doc/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ def active_ballot_positions(doc):
3535
active_ads = list(Person.objects.filter(role__name="ad", role__group__state="active"))
3636
res = {}
3737

38-
positions = BallotPositionDocEvent.objects.filter(doc=doc, type="changed_ballot_position", ad__in=active_ads).select_related('ad').order_by("-time", "-id")
38+
start = datetime.datetime.min
39+
e = doc.latest_event(type="started_iesg_process")
40+
if e:
41+
start = e.time
42+
43+
positions = BallotPositionDocEvent.objects.filter(doc=doc, type="changed_ballot_position", ad__in=active_ads, time__gte=start).select_related('ad').order_by("-time", "-id")
3944

4045
for pos in positions:
4146
if pos.ad not in res:

0 commit comments

Comments
 (0)