Payments in the list for a tournament are distinct
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
afbc67c413
commit
12d25b64fe
|
@ -590,7 +590,8 @@ class TournamentPaymentsView(VolunteerMixin, SingleTableMixin, DetailView):
|
||||||
|
|
||||||
def get_table_data(self):
|
def get_table_data(self):
|
||||||
return Payment.objects.filter(registrations__team__participation__tournament=self.get_object()) \
|
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):
|
class TournamentExportCSVView(VolunteerMixin, DetailView):
|
||||||
|
|
Loading…
Reference in New Issue