Don't set notes if there isn't anyone

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2024-04-06 10:42:55 +02:00
parent 8996fc2cca
commit d13385fa01
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 2 additions and 0 deletions

View File

@ -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()