From f5a7b67e7a81c476aa5712a6c01ea75c87022d03 Mon Sep 17 00:00:00 2001 From: symroe Date: Mon, 29 Jun 2026 20:25:14 +0100 Subject: [PATCH] Filter on None on leaflets with no party page It would be nice to convert this to a NOT NULL field, but this is a quick fix to the view --- electionleaflets/apps/analysis/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electionleaflets/apps/analysis/views.py b/electionleaflets/apps/analysis/views.py index ca082a76..dedf8ae2 100644 --- a/electionleaflets/apps/analysis/views.py +++ b/electionleaflets/apps/analysis/views.py @@ -22,6 +22,6 @@ class WithoutPartyTagLeafletList(BaseTagLeafletList): def get_queryset(self): return ( Leaflet.objects.all() - .filter(ynr_party_id="") + .filter(ynr_party_id=None) .order_by("-date_uploaded") )