6364: dead people are shown as alive in narrated web page export

svn: r21219
This commit is contained in:
Doug Blank 2013-01-25 12:53:50 +00:00
parent 1e7b512c7c
commit 8c820e1ce2

View File

@ -106,9 +106,9 @@ class ProbablyAlive(object):
if death_ref and death_ref.get_role().is_primary(): if death_ref and death_ref.get_role().is_primary():
if death_ref: if death_ref:
death = self.db.get_event_from_handle(death_ref.ref) death = self.db.get_event_from_handle(death_ref.ref)
if death and death.get_date_object().get_start_date() != Date.EMPTY: if death and death.get_date_object().is_valid():
death_date = death.get_date_object() death_date = death.get_date_object()
elif death: # has a death event, but it is empty: elif death: # has a death event, but it is no valid:
death_date = Today() # before today death_date = Today() # before today
death_date.set_modifier(Date.MOD_BEFORE) death_date.set_modifier(Date.MOD_BEFORE)
explain = _("death event without date") explain = _("death event without date")
@ -121,7 +121,7 @@ class ProbablyAlive(object):
ev = self.db.get_event_from_handle(ev_ref.ref) ev = self.db.get_event_from_handle(ev_ref.ref)
if ev and ev.type.is_death_fallback(): if ev and ev.type.is_death_fallback():
death_date = ev.get_date_object() death_date = ev.get_date_object()
if death_date.get_start_date() != Date.EMPTY: if death_date.get_start_date().is_valid():
explain = _("death-related evidence") explain = _("death-related evidence")
else: else:
death_date = Today() # before today death_date = Today() # before today