From 17b9ca72c0e09a93d14e35a5fb34fcc2eaeac69f Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Fri, 9 Apr 2021 17:02:45 +0200 Subject: [PATCH] Querysets are confusing --- partners/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/partners/views.py b/partners/views.py index 605189e..99e0199 100644 --- a/partners/views.py +++ b/partners/views.py @@ -86,7 +86,7 @@ class OffersListView(LoginRequiredMixin, ListView): template_name = "partners/offer_list.html" def get_queryset(self): - return Offer.objects.filter(establishment__in=self.request.user.partnerprofile.establishment_set) + return Offer.objects.filter(establishment__in=self.request.user.partnerprofile.establishment_set.all()) class EstablishmentsListView(LoginRequiredMixin, ListView): model = Establishment