From e0044c643bd433524468d96ce2512f8ca58e6e41 Mon Sep 17 00:00:00 2001 From: John Carroll Date: Wed, 10 Mar 2021 02:09:49 -0500 Subject: [PATCH 1/2] exclude hearings from open mtg query --- fec/home/views.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fec/home/views.py b/fec/home/views.py index 49b39f98c3..06aa2bbd7a 100644 --- a/fec/home/views.py +++ b/fec/home/views.py @@ -317,9 +317,7 @@ def index_meetings(request): Serve 'commission meetings' page under 'about' """ meetings = MeetingPage.objects.live().order_by("-date") - open_meetings = meetings.filter( - Q(meeting_type="O") | Q(title__icontains="Hearing") | Q(meeting_type="H") - ) + open_meetings = meetings.filter(meeting_type="O").exclude(title__icontains="Hearing") executive_sessions = meetings.filter(meeting_type="E") hearings = meetings.filter(Q(title__icontains="Hearing") | Q(meeting_type="H")) year = request.GET.get("year", "") From c8a1afd4136fa8c233df2004910a5bbc57c40500 Mon Sep 17 00:00:00 2001 From: John Carroll Date: Thu, 11 Mar 2021 01:43:28 -0500 Subject: [PATCH 2/2] limit open mtgs search to open mtgs only --- fec/fec/templates/home_base.html | 2 +- fec/home/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fec/fec/templates/home_base.html b/fec/fec/templates/home_base.html index bb89e44300..59a16250de 100644 --- a/fec/fec/templates/home_base.html +++ b/fec/fec/templates/home_base.html @@ -4,7 +4,7 @@ {% include 'partials/meta-tags.html' %} - {% include 'partials/meta-tags-preloads.html %} + {% include 'partials/meta-tags-preloads.html' %} {% if settings.FEC_CMS_ENVIRONMENT == 'PRODUCTION' %} {% include 'partials/meta-tags-preconnects.html' %} {% endif %} diff --git a/fec/home/views.py b/fec/home/views.py index 06aa2bbd7a..60b22c82d6 100644 --- a/fec/home/views.py +++ b/fec/home/views.py @@ -361,7 +361,7 @@ def index_meetings(request): if search: if active == "open-meetings": meetings_query = search - meetings = meetings.search(meetings_query) + open_meetings = open_meetings.search(meetings_query) if active == "hearings": hearings_query = search hearings = hearings.search(hearings_query)