mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-24 03:08:52 +02:00
Process notation sheets when there are 4 or 5 teams
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -809,9 +809,11 @@ class PoolUploadNotesView(VolunteerMixin, FormView, DetailView):
|
||||
if vr not in pool.juries.all():
|
||||
form.add_error('file', _("The following user is not registered as a jury:") + " " + str(vr))
|
||||
|
||||
# There is an observer note for 4-teams pools
|
||||
notes_count = 7 if pool.passages.count() == 4 else 6
|
||||
for i, passage in enumerate(pool.passages.all()):
|
||||
note = Note.objects.get_or_create(jury=vr, passage=passage)[0]
|
||||
passage_notes = notes[6 * i:6 * (i + 1)]
|
||||
passage_notes = notes[notes_count * i:notes_count * (i + 1)]
|
||||
note.set_all(*passage_notes)
|
||||
note.save()
|
||||
|
||||
|
Reference in New Issue
Block a user