Get rid of initial "No record" positions when showing old positions,
it's just noise - Legacy-Id: 5312
This commit is contained in:
parent
db2c2a418c
commit
ab6a7f85c0
|
@ -594,7 +594,13 @@ class BallotDocEvent(DocEvent):
|
|||
|
||||
if e.pos != prev:
|
||||
latest.old_positions.append(e.pos)
|
||||
|
||||
|
||||
# get rid of trailling "No record" positions, some old ballots
|
||||
# have plenty of these
|
||||
for p in positions:
|
||||
while p.old_positions and p.old_positions[-1].slug == "norecord":
|
||||
p.old_positions.pop()
|
||||
|
||||
# add any missing ADs through fake No Record events
|
||||
if self.doc.active_ballot() == self:
|
||||
norecord = BallotPositionName.objects.get(slug="norecord")
|
||||
|
|
Loading…
Reference in a new issue