Skip to content
This repository has been archived by the owner on Mar 5, 2021. It is now read-only.

Commit

Permalink
fix real_entities()
Browse files Browse the repository at this point in the history
  • Loading branch information
evildmp committed Apr 26, 2013
1 parent dbf6ab6 commit 9dae549
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contacts_and_people/models.py
Expand Up @@ -492,7 +492,7 @@ def get_roles_for_members(self, members):
The roles returned are in alphabetical order by Person. The roles returned are in alphabetical order by Person.
""" """
for member in members: for member in members:
ms = member.member_of.all() ms = member.member_of()
# get the best named membership in the entity # get the best named membership in the entity
named_memberships = list(ms.filter(entity=self).exclude(role ="").order_by('-importance_to_person')) named_memberships = list(ms.filter(entity=self).exclude(role ="").order_by('-importance_to_person'))
if named_memberships: if named_memberships:
Expand Down Expand Up @@ -714,7 +714,7 @@ def get_please_contact(self):
@property @property
def real_entities(self): def real_entities(self):
# returns non-abstract entities the person belongs to # returns non-abstract entities the person belongs to
return self.member_of.objects.filter(entity__abstract_entity = False) return self.member_of.filter(entity__abstract_entity = False)




def gather_entities(self): def gather_entities(self):
Expand Down

0 comments on commit 9dae549

Please sign in to comment.