From 2a216fd9946554263056dd3da94afb4c9ae7b76f Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Mon, 4 Oct 2021 13:50:39 +0200 Subject: [PATCH] Entries are distinct Signed-off-by: Yohann D'ANELLO --- apps/activity/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/activity/views.py b/apps/activity/views.py index 270083cb..9e7c9704 100644 --- a/apps/activity/views.py +++ b/apps/activity/views.py @@ -190,7 +190,7 @@ class ActivityEntryView(LoginRequiredMixin, TemplateView): .annotate(balance=F("inviter__balance"), note_name=F("inviter__user__username"))\ .filter(activity=activity)\ .filter(PermissionBackend.filter_queryset(self.request, Guest, "view"))\ - .order_by('last_name', 'first_name').distinct() + .order_by('last_name', 'first_name') if "search" in self.request.GET and self.request.GET["search"]: pattern = self.request.GET["search"] @@ -204,7 +204,7 @@ class ActivityEntryView(LoginRequiredMixin, TemplateView): ) else: guest_qs = guest_qs.none() - return guest_qs + return guest_qs.distinct() def get_invited_note(self, activity): """