Bug#4005: Fixes the marriage/ divorce issue in anniversaries.

svn: r15450
This commit is contained in:
Rob G. Healey 2010-05-23 04:24:49 +00:00
parent bd937a1842
commit aa8e6754c5

View File

@ -1655,10 +1655,11 @@ def get_marriage_event(db, family):
for event_ref in family.get_event_ref_list():
event = db.get_event_from_handle(event_ref.ref)
if event.type.is_marriage:
if event.type in [EventType.MARRIAGE, EventType.MARR_ALT]:
marriage_event = event
elif event.type.is_divorce:
continue
elif event.type in [EventType.DIVORCE, EventType.ANNULMENT, EventType.DIV_FILING]:
break
# return the marriage event or False to it caller
return marriage_event