Protection from missing (or inaccessible) person

svn: r15455
This commit is contained in:
Doug Blank 2010-05-23 14:51:51 +00:00
parent 4ce41d4656
commit 80f5069a49

View File

@ -1221,6 +1221,8 @@ def get_participant_from_event(db, event_handle):
families = set([x[1] for x in result_list if x[0] == 'Family']) families = set([x[1] for x in result_list if x[0] == 'Family'])
for personhandle in people: for personhandle in people:
person = db.get_person_from_handle(personhandle) person = db.get_person_from_handle(personhandle)
if not person:
continue
for event_ref in person.get_event_ref_list(): for event_ref in person.get_event_ref_list():
if event_handle == event_ref.ref and \ if event_handle == event_ref.ref and \
event_ref.get_role().is_primary(): event_ref.get_role().is_primary():