Skip to content

Commit

Permalink
only match on MPs who are in office on search page
Browse files Browse the repository at this point in the history
  • Loading branch information
struan committed Feb 20, 2024
1 parent 5f83bc6 commit 68ed4ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hub/views/area.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def get_context_data(self, **kwargs):
else:
for area in areas:
try:
area.mp = Person.objects.get(area=area)
area.mp = Person.objects.get(area=area, end_date__isnull=True)
except Person.DoesNotExist:
pass
areas.sort(key=lambda area: area.name)
Expand Down

0 comments on commit 68ed4ba

Please sign in to comment.