mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 08:22:10 +01:00 
			
		
		
		
	Fix script that generates data for second teams when there are 5 teams in the pool
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
		@@ -7,7 +7,7 @@ from django.utils.translation import activate
 | 
			
		||||
import gspread
 | 
			
		||||
from gspread.utils import a1_range_to_grid_range, MergeType
 | 
			
		||||
 | 
			
		||||
from ...models import Tournament
 | 
			
		||||
from ...models import Passage, Tournament
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Command(BaseCommand):
 | 
			
		||||
@@ -50,14 +50,14 @@ class Command(BaseCommand):
 | 
			
		||||
            team2, score2 = sorted_notes[1]
 | 
			
		||||
            team3, score3 = sorted_notes[2]
 | 
			
		||||
 | 
			
		||||
            pool1 = tournament.pools.get(round=1, participations=team2)
 | 
			
		||||
            defender_passage_1 = pool1.passages.get(defender=team2)
 | 
			
		||||
            opponent_passage_1 = pool1.passages.get(opponent=team2)
 | 
			
		||||
            reporter_passage_1 = pool1.passages.get(reporter=team2)
 | 
			
		||||
            pool2 = tournament.pools.get(round=2, participations=team2)
 | 
			
		||||
            defender_passage_2 = pool2.passages.get(defender=team2)
 | 
			
		||||
            opponent_passage_2 = pool2.passages.get(opponent=team2)
 | 
			
		||||
            reporter_passage_2 = pool2.passages.get(reporter=team2)
 | 
			
		||||
            pool1 = tournament.pools.filter(round=1, participations=team2).first()
 | 
			
		||||
            defender_passage_1 = Passage.objects.get(pool__tournament=tournament, pool__round=1, defender=team2)
 | 
			
		||||
            opponent_passage_1 = Passage.objects.get(pool__tournament=tournament, pool__round=1, opponent=team2)
 | 
			
		||||
            reporter_passage_1 = Passage.objects.get(pool__tournament=tournament, pool__round=1, reporter=team2)
 | 
			
		||||
            pool2 = tournament.pools.filter(round=2, participations=team2).first()
 | 
			
		||||
            defender_passage_2 = Passage.objects.get(pool__tournament=tournament, pool__round=2, defender=team2)
 | 
			
		||||
            opponent_passage_2 = Passage.objects.get(pool__tournament=tournament, pool__round=2, opponent=team2)
 | 
			
		||||
            reporter_passage_2 = Passage.objects.get(pool__tournament=tournament, pool__round=2, reporter=team2)
 | 
			
		||||
 | 
			
		||||
            line.append(team2.team.trigram)
 | 
			
		||||
            line.append(str(pool1.jury_president or ""))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user