From 8be93e0caaf4e366b6cdbe811119afa88bb10b2d Mon Sep 17 00:00:00 2001 From: Sym Roe Date: Wed, 1 May 2024 20:42:25 +0100 Subject: [PATCH] Show manifesto from all elections for a person --- wcivf/apps/people/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcivf/apps/people/views.py b/wcivf/apps/people/views.py index 449e052d4..564ca418c 100644 --- a/wcivf/apps/people/views.py +++ b/wcivf/apps/people/views.py @@ -77,7 +77,9 @@ def get_object(self, queryset=None): # We can't show manifestos if they've never stood for a party obj.manifestos = Manifesto.objects.filter( party=obj.featured_candidacy.party, - election=obj.featured_candidacy.election, + election__in=obj.current_or_future_candidacies.values( + "election" + ), ).filter( Q(country="Local") | Q(country="UK")