From d0170daccec387534144926900db950ca6c30fe2 Mon Sep 17 00:00:00 2001 From: Forest Gregg Date: Sat, 6 Jan 2024 08:44:05 -0500 Subject: [PATCH] explicitly remove bills that don't have action dates from primary sponsorships --- chicago/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/chicago/models.py b/chicago/models.py index e57343a..1618d03 100644 --- a/chicago/models.py +++ b/chicago/models.py @@ -288,6 +288,7 @@ def primary_sponsorships(self): sponsorships__person=self, sponsorships__primary=True ) .annotate(last_action=models.Max("actions__date")) + .filter(last_action__isnull=False) .order_by("-last_action") )