Skip to content

Commit

Permalink
update area view to only select current MPs
Browse files Browse the repository at this point in the history
makes no difference at the moment as all MPs are current.
  • Loading branch information
struan committed Dec 14, 2023
1 parent 735bdd0 commit 4ed1557
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hub/views/area.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ def get_context_data(self, **kwargs):
context["area_type"] = str(self.object.area_type)
try:
context["mp"] = {
"person": Person.objects.get(area=self.object, person_type="MP")
"person": Person.objects.get(
area=self.object, person_type="MP", end_date__isnull=True
)
}

data = PersonData.objects.filter(
Expand Down

0 comments on commit 4ed1557

Please sign in to comment.