From d13385fa018b9e334396a76752d9cdfc42a56db7 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Sat, 6 Apr 2024 10:42:55 +0200 Subject: [PATCH] Don't set notes if there isn't anyone Signed-off-by: Emmy D'Anello --- participation/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/participation/models.py b/participation/models.py index bb80f43..fde6946 100644 --- a/participation/models.py +++ b/participation/models.py @@ -1327,6 +1327,8 @@ class Pool(models.Model): for i, passage in enumerate(self.passages.all()): note = passage.notes.get(jury=jury) note_line = line[2 + i * passage_width:2 + (i + 1) * passage_width] + if not note_line: # There is no note + continue note.set_all(*note_line) note.save()