def find_system_contacts self contact_role contact_list rq ResourceQue

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
def find_system_contacts(self, contact_role=''):
contact_list = []
rq = ResourceQuery()
filters = [rq.filter_type(RT.ActorIdentity)]
if contact_role:
target_filter = rq.filter_attribute('contact_roles', rq.all_match(contact_role))
filters.append(rq.filter_associated_from_object(predicate=PRED.hasContactDetails,
target_filter=target_filter))
rq.set_filter(*filters)
user_objs = rr.find_resources_ext(query=rq.get_query(), id_only=False)