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

Payments in the list for a tournament are distinct

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2024-03-16 10:40:56 +01:00
parent afbc67c413
commit 12d25b64fe
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -590,7 +590,8 @@ class TournamentPaymentsView(VolunteerMixin, SingleTableMixin, DetailView):
def get_table_data(self):
return Payment.objects.filter(registrations__team__participation__tournament=self.get_object()) \
.annotate(team_id=F('registrations__team')).order_by('-valid', 'registrations__team__trigram').all()
.annotate(team_id=F('registrations__team')).order_by('-valid', 'registrations__team__trigram') \
.distinct().all()
class TournamentExportCSVView(VolunteerMixin, DetailView):