Upload notes to Google Sheets after uploading a CSV file

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2024-03-31 20:59:00 +02:00
parent 1cbf95e6e1
commit 40988348d3
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 3 additions and 0 deletions

View File

@ -1177,6 +1177,9 @@ class PoolUploadNotesView(VolunteerMixin, FormView, DetailView):
note.set_all(*list(map(int, passage_notes)))
note.save()
if os.getenv('GOOGLE_PRIVATE_KEY_ID', None):
pool.update_notes_spreadsheet()
messages.success(self.request, _("Notes were successfully uploaded."))
return super().form_valid(form)