mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-24 04:28:48 +02:00
Add script to parse notes in Google Sheets
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -1101,7 +1101,7 @@ class PoolUploadNotesView(VolunteerMixin, FormView, DetailView):
|
||||
for i, passage in enumerate(pool.passages.all()):
|
||||
note = Note.objects.get_or_create(jury=vr, passage=passage)[0]
|
||||
passage_notes = notes[notes_count * i:notes_count * (i + 1)]
|
||||
note.set_all(*passage_notes)
|
||||
note.set_all(*list(map(int, passage_notes)))
|
||||
note.save()
|
||||
|
||||
messages.success(self.request, _("Notes were successfully uploaded."))
|
||||
@ -1967,3 +1967,8 @@ class NoteUpdateView(VolunteerMixin, UpdateView):
|
||||
# Set the note of the observer only for 4-teams pools
|
||||
del form.fields['observer_oral']
|
||||
return form
|
||||
|
||||
def form_valid(self, form):
|
||||
ret = super().form_valid(form)
|
||||
self.object.update_spreadsheet()
|
||||
return ret
|
||||
|
Reference in New Issue
Block a user