fix: allow view supplements to add to profile member context
This commit is contained in:
parent
1f38894f02
commit
9146cdc835
|
@ -742,10 +742,15 @@ class PersonView(MasterView):
|
|||
membership = app.get_membership_handler()
|
||||
|
||||
data = OrderedDict()
|
||||
|
||||
members = membership.get_members_for_account_holder(person)
|
||||
for member in members:
|
||||
data[member.uuid] = self.get_context_member(member)
|
||||
context = self.get_context_member(member)
|
||||
|
||||
for supp in self.iter_view_supplements():
|
||||
if hasattr(supp, 'get_context_for_member'):
|
||||
context = supp.get_context_for_member(member, context)
|
||||
|
||||
data[member.uuid] = context
|
||||
|
||||
return list(data.values())
|
||||
|
||||
|
|
Loading…
Reference in a new issue