Skip to content

Commit ab6a7f8

Browse files
committed
Get rid of initial "No record" positions when showing old positions,
it's just noise - Legacy-Id: 5312
1 parent db2c2a4 commit ab6a7f8

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

ietf/doc/models.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,13 @@ def all_positions(self):
594594

595595
if e.pos != prev:
596596
latest.old_positions.append(e.pos)
597-
597+
598+
# get rid of trailling "No record" positions, some old ballots
599+
# have plenty of these
600+
for p in positions:
601+
while p.old_positions and p.old_positions[-1].slug == "norecord":
602+
p.old_positions.pop()
603+
598604
# add any missing ADs through fake No Record events
599605
if self.doc.active_ballot() == self:
600606
norecord = BallotPositionName.objects.get(slug="norecord")

0 commit comments

Comments
 (0)