From 13c815c62c5598a76eab2b2c4e1b85a0e657612d Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Sat, 20 Apr 2024 21:43:37 +0200 Subject: [PATCH] Allow to parse empty mentions Signed-off-by: Emmy D'Anello --- participation/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/participation/models.py b/participation/models.py index b99f166..d2e4b8e 100644 --- a/participation/models.py +++ b/participation/models.py @@ -676,7 +676,7 @@ class Tournament(models.Model): notes[participation] = note sorted_notes = sorted(notes.items(), key=lambda x: x[1], reverse=True) 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: participation.mention = mention else: