Skip to content

Commit

Permalink
Add the select related to members and leaders on the team page
Browse files Browse the repository at this point in the history
  • Loading branch information
CamLamb committed Nov 29, 2024
1 parent b724135 commit 3c4e755
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/peoplefinder/views/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ def members(self) -> list[TeamMember]:
self.object.members.all()
.active()
.exclude(id__in=[leader.id for leader in self.leaders])
.select_related(
"person",
"person__uk_office_location",
)
.order_by("person__first_name", "person__last_name")
.distinct("person", "person__first_name", "person__last_name")
)
Expand Down

0 comments on commit 3c4e755

Please sign in to comment.