1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-24 03:02:23 +00:00

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

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