diff --git a/draw/consumers.py b/draw/consumers.py index c54575f..af3a919 100644 --- a/draw/consumers.py +++ b/draw/consumers.py @@ -456,10 +456,10 @@ class DrawConsumer(AsyncJsonWebsocketConsumer): td2 = await TeamDraw.objects.filter(participation=td.participation, round=round2).aget() td2.pool = round2_pools[current_pool_id] td2.passage_index = current_passage_index - if len(round2_pools) == 1 and len(tds) == 5: - # Exchange teams 1 and 5 if there is only one pool with 5 teams - if i == 0 or i == 4: - td2.passage_index = 4 - i + if len(round2_pools) == 1: + # Exchange first and last team if there is only one pool + if i == 0 or i == len(tds) - 1: + td2.passage_index = len(tds) - 1 - i current_passage_index += 1 await td2.asave()