Skip to content

Commit

Permalink
use person type when looking up MP
Browse files Browse the repository at this point in the history
  • Loading branch information
struan committed Dec 14, 2023
1 parent 40908c3 commit e8d6dd6
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 @@ -201,7 +201,9 @@ def get_context_data(self, **kwargs):
context["overlap_constituencies"] = self.get_overlap_info()
context["area_type"] = str(self.object.area_type)
try:
context["mp"] = {"person": Person.objects.get(area=self.object)}
context["mp"] = {
"person": Person.objects.get(area=self.object, person_type="MP")
}

data = PersonData.objects.filter(
person=context["mp"]["person"]
Expand Down

0 comments on commit e8d6dd6

Please sign in to comment.