mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 15:22:26 +01:00 
			
		
		
		
	A team can't accept a problem that was previously *accepted* not the last purposed
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
		@@ -541,7 +541,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
 | 
				
			|||||||
            if await TeamDraw.objects.filter(participation_id=td.participation_id,
 | 
					            if await TeamDraw.objects.filter(participation_id=td.participation_id,
 | 
				
			||||||
                                             round__draw__tournament=self.tournament,
 | 
					                                             round__draw__tournament=self.tournament,
 | 
				
			||||||
                                             round__number=1,
 | 
					                                             round__number=1,
 | 
				
			||||||
                                             purposed=problem).aexists():
 | 
					                                             accepted=problem).aexists():
 | 
				
			||||||
                continue
 | 
					                continue
 | 
				
			||||||
            # Check that the problem is not already chosen once (or twice for a 5-teams pool)
 | 
					            # Check that the problem is not already chosen once (or twice for a 5-teams pool)
 | 
				
			||||||
            if await pool.teamdraw_set.filter(accepted=problem).acount() < (2 if pool.size == 5 else 1):
 | 
					            if await pool.teamdraw_set.filter(accepted=problem).acount() < (2 if pool.size == 5 else 1):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user