From 9f04aaff44a026abb0b7d520ba477ae2e07db83d Mon Sep 17 00:00:00 2001 From: Ori Hoch Date: Thu, 27 Apr 2017 09:28:22 +0300 Subject: [PATCH] fix bug in committee meetings admin which prevented accessing it --- committees/admin.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/committees/admin.py b/committees/admin.py index 2d848fe1..a89e00dc 100644 --- a/committees/admin.py +++ b/committees/admin.py @@ -87,11 +87,7 @@ def committee_type(self, obj): return obj.committee.type def protocol_parts(self, obj): - return obj.num_parts - - def get_queryset(self, request): - qs = super(CommitteeMeetingAdmin, self).get_queryset(request) - return qs.annotate(num_parts=Count('parts')) + return obj.parts.all().count() def redownload_and_reparse_protocol(self, request, qs): mks, mk_names = get_all_mk_names()