5705: Wrong detection of error (burial before death) when checking data

svn: r19657
This commit is contained in:
Jérôme Rapinat 2012-05-26 09:02:08 +00:00
parent 6de66ff923
commit 5f000ec3f1

View File

@ -136,6 +136,9 @@ def get_date_from_event_type(db,person,event_type,estimate=False):
for event_ref in person.get_event_ref_list():
event = find_event(db,event_ref.ref)
if event:
if event_ref.get_role() != gen.lib.EventRoleType.PRIMARY and \
event.get_type() == gen.lib.EventType.BURIAL:
continue
if event.get_type() == event_type:
date_obj = event.get_date_object()
if not estimate and \