Skip to content

Commit

Permalink
Merge pull request #4466 from fecgov/feature/4349/exclude-hearings-fr…
Browse files Browse the repository at this point in the history
…om-open-mtg-tab

Exclude hearings from open mtg tab/fix open mtg search
  • Loading branch information
JonellaCulmer authored Mar 19, 2021
2 parents b85db8a + 075d9b3 commit 24470b6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fec/home/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", "")
Expand Down Expand Up @@ -363,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)
Expand Down

0 comments on commit 24470b6

Please sign in to comment.