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 19, 2024
1 parent eb802f0 commit faa1e03
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 faa1e03

Please sign in to comment.