Use french translation when submitting notes to Google Sheets
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
3ca0148934
commit
ecf80f8b81
|
@ -1372,6 +1372,8 @@ class Pool(models.Model):
|
|||
worksheet.client.batch_update(spreadsheet.id, body)
|
||||
|
||||
def update_juries_lines_spreadsheet(self):
|
||||
translation.activate('fr')
|
||||
|
||||
gc = gspread.service_account_from_dict(settings.GOOGLE_SERVICE_CLIENT)
|
||||
spreadsheet = gc.open_by_key(self.tournament.notes_sheet_id)
|
||||
worksheet = spreadsheet.worksheet(f"Poule {self.short_name}")
|
||||
|
@ -1759,6 +1761,8 @@ class Note(models.Model):
|
|||
if not self.has_any_note():
|
||||
return
|
||||
|
||||
translation.activate('fr')
|
||||
|
||||
gc = gspread.service_account_from_dict(settings.GOOGLE_SERVICE_CLIENT)
|
||||
passage = Passage.objects.prefetch_related('pool__tournament', 'pool__participations').get(pk=self.passage.pk)
|
||||
spreadsheet_id = passage.pool.tournament.notes_sheet_id
|
||||
|
|
Loading…
Reference in New Issue