1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-25 06:22:22 +00:00

Allow to parse empty mentions

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2024-04-20 21:43:37 +02:00
parent 35e3be8af3
commit 13c815c62c
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -676,7 +676,7 @@ class Tournament(models.Model):
notes[participation] = note notes[participation] = note
sorted_notes = sorted(notes.items(), key=lambda x: x[1], reverse=True) sorted_notes = sorted(notes.items(), key=lambda x: x[1], reverse=True)
for i, (participation, _note) in enumerate(sorted_notes): for i, (participation, _note) in enumerate(sorted_notes):
mention = mentions[i][3] mention = mentions[i][3] if len(mentions[i]) >= 4 else ""
if not self.final: if not self.final:
participation.mention = mention participation.mention = mention
else: else: