Unverified Commit 1314e667 authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Add prefetch-related statements

parent 0191629a
......@@ -19,7 +19,8 @@ def details(request, committee_id):
members = []
memberships = (CommitteeMembership
.active_memberships
.filter(committee=committee))
.filter(committee=committee)
.prefetch_related('member'))
for membership in memberships:
member = membership.member
member.chair = membership.chair
......@@ -40,7 +41,8 @@ def boards(request, year=None):
members = []
memberships = (CommitteeMembership
.objects
.filter(committee=board))
.filter(committee=board)
.prefetch_related('member'))
for membership in memberships:
member = membership.member
member.role = membership.role
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment