3930: Verify data tool ignores role on burial event

svn: r16257
This commit is contained in:
Jérôme Rapinat 2010-12-07 13:44:18 +00:00
parent ee54e58b57
commit a92ee1341f

View File

@ -140,7 +140,12 @@ def get_bapt_date(db,person):
return get_date_from_event_type(db,person,gen.lib.EventType.BAPTISM)
def get_bury_date(db,person):
return get_date_from_event_type(db,person,gen.lib.EventType.BURIAL)
# check role on burial event
for event_ref in person.get_event_ref_list():
event = find_event(db, event_ref.ref)
if event.get_type() == gen.lib.EventType.BURIAL and \
event_ref.get_role() == gen.lib.EventRoleType.PRIMARY:
return get_date_from_event_type(db,person,gen.lib.EventType.BURIAL)
def get_birth_date(db,person,estimate=False):
if not person: