Beispiel #1
0
 def list(self, formember_id, bizplace_ids=[], hashrows=True):
     my_bizplace_ids = [ms.bizplace_id for ms in dbaccess.find_memberships(formember_id)]
     if bizplace_ids:
         bizplace_ids = set(my_bizplace_ids).intersection(bizplace_ids)
     member_list = []
     for m_dict in dbaccess.find_bizplace_members(bizplace_ids, ['member', 'name', 'email'], hashrows):
         if isinstance(m_dict, dict): m_dict['id'] = m_dict.pop('member')
         member_list.append(m_dict)
     return member_list
Beispiel #2
0
 def list(self, formember_id, bizplace_ids=[]):
     member = dbaccess.Member(formember_id)
     my_bizplace_ids = [ms.bizplace_id for ms in member.memberships()]
     if bizplace_ids:
         bizplace_ids = set(my_bizplace_ids).intersection(bizplace_ids)
     member_list = []
     for m_dict in dbaccess.find_bizplace_members(bizplace_ids):
         m_dict['id'] = m_dict.pop('member')
         member_list.append(m_dict)
     return member_list
Beispiel #3
0
 def members(self, bizplace_id, show_enabled=True, show_disabled=True, show_hidden=True):
     """
     returns list bizplace members in the form of tuple (id, name)
     """
     return dbaccess.find_bizplace_members(bizplace_id)