1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-24 15:00:30 +02:00

Don't use Google Sheets in tests (for now)

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello
2024-03-31 15:30:17 +02:00
parent bf5c673739
commit 779aec5e55
3 changed files with 10 additions and 3 deletions

View File

@ -1,6 +1,8 @@
# Copyright (C) 2023 by Animath
# SPDX-License-Identifier: GPL-3.0-or-later
import os
from asgiref.sync import sync_to_async
from django.conf import settings
from django.core.validators import MaxValueValidator, MinValueValidator
@ -399,7 +401,9 @@ class Pool(models.Model):
passage.observer = tds[line[3]].participation
await passage.asave()
await sync_to_async(self.associated_pool.update_spreadsheet)()
# Update Google Sheets
if os.getenv('GOOGLE_PRIVATE_KEY_ID', None):
await sync_to_async(self.associated_pool.update_spreadsheet)()
return self.associated_pool