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

svn: r19644
This commit is contained in:
Jérôme Rapinat 2012-05-25 14:02:29 +00:00
parent 394f9f9d12
commit cfaee2894a

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 \