From ffaa6e81168e6ffadfc59ae4d067316be405963a Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Thu, 15 Apr 2021 23:03:51 +0200 Subject: [PATCH] Force pool and passage tables to have chronological orders --- apps/participation/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/participation/views.py b/apps/participation/views.py index e0a0003..9c65aa9 100644 --- a/apps/participation/views.py +++ b/apps/participation/views.py @@ -534,7 +534,7 @@ class TournamentDetailView(DetailView): def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context["teams"] = ParticipationTable(self.object.participations.all()) - context["pools"] = PoolTable(self.object.pools.all()) + context["pools"] = PoolTable(self.object.pools.order_by('id').all()) notes = dict() for participation in self.object.participations.all(): @@ -616,7 +616,7 @@ class PoolDetailView(LoginRequiredMixin, DetailView): def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) - context["passages"] = PassageTable(self.object.passages.all()) + context["passages"] = PassageTable(self.object.passages.order_by('id').all()) if self.object.results_available or self.request.user.registration.is_volunteer: # Hide notes before the end of the turn