Skip to content
Snippets Groups Projects
Commit d62571b2 authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

Fix combination of AK admin filters

parent 26fcb937
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,7 @@ class WishFilter(SimpleListFilter): ...@@ -29,7 +29,7 @@ class WishFilter(SimpleListFilter):
] ]
def queryset(self, request, queryset): 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': if self.value() == 'NO_WISH':
return annotated_queryset.filter(owner_count__gt=0) return annotated_queryset.filter(owner_count__gt=0)
if self.value() == 'WISH': if self.value() == 'WISH':
......
...@@ -17,7 +17,7 @@ msgstr "AK-Wunsch" ...@@ -17,7 +17,7 @@ msgstr "AK-Wunsch"
#: admin.py:27 #: admin.py:27
msgid "Is wish" msgid "Is wish"
msgstr "Is ein Wunsch" msgstr "Ist ein Wunsch"
#: admin.py:28 #: admin.py:28
msgid "Is not a wish" msgid "Is not a wish"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment