From d62571b21a5de77cee878905555a8f9671eb80b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Benjamin=20H=C3=A4ttasch?=
 <benjamin.haettasch@fachschaft.informatik.tu-darmstadt.de>
Date: Wed, 30 Oct 2019 19:57:40 +0100
Subject: [PATCH] Fix combination of AK admin filters

---
 AKModel/admin.py                           | 2 +-
 AKModel/locale/de_DE/LC_MESSAGES/django.po | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/AKModel/admin.py b/AKModel/admin.py
index bd24847..449e5cb 100644
--- a/AKModel/admin.py
+++ b/AKModel/admin.py
@@ -29,7 +29,7 @@ class WishFilter(SimpleListFilter):
     ]
 
   def queryset(self, request, queryset):
-      annotated_queryset = AK.objects.annotate(owner_count=Count(F('owners')))
+      annotated_queryset = queryset.annotate(owner_count=Count(F('owners')))
       if self.value() == 'NO_WISH':
           return annotated_queryset.filter(owner_count__gt=0)
       if self.value() == 'WISH':
diff --git a/AKModel/locale/de_DE/LC_MESSAGES/django.po b/AKModel/locale/de_DE/LC_MESSAGES/django.po
index 017d444..0424d24 100644
--- a/AKModel/locale/de_DE/LC_MESSAGES/django.po
+++ b/AKModel/locale/de_DE/LC_MESSAGES/django.po
@@ -17,7 +17,7 @@ msgstr "AK-Wunsch"
 
 #: admin.py:27
 msgid "Is wish"
-msgstr "Is ein Wunsch"
+msgstr "Ist ein Wunsch"
 
 #: admin.py:28
 msgid "Is not a wish"
-- 
GitLab