1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-24 17:42:23 +00:00

Don't parse spreadsheet if there is no spreadsheet

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2024-04-06 10:38:09 +02:00
parent 923b07b97e
commit 65dcc978c1
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -26,6 +26,12 @@ class Command(BaseCommand):
if options['verbosity'] >= 1:
self.stdout.write(f"Parsing notation sheet for {tournament}")
if not tournament.notes_sheet_id:
if options['verbosity'] >= 1:
self.stdout.write(
self.style.WARNING(f"No spreadsheet found for {tournament}. Please create it first"))
continue
pools = tournament.pools.all()
if options['round']:
pools = pools.filter(round=options['round'])