3673: People with less than 1 year seems to be ignored on 'Age on Date' gramplet and 'Records' report
svn: r14689
This commit is contained in:
parent
3ae0224e1a
commit
8418c06ae0
18
src/Utils.py
18
src/Utils.py
@ -456,18 +456,20 @@ class ProbablyAlive(object):
|
|||||||
# If the recorded death year is before current year then
|
# If the recorded death year is before current year then
|
||||||
# things are simple.
|
# things are simple.
|
||||||
if death_ref and death_ref.get_role().is_primary():
|
if death_ref and death_ref.get_role().is_primary():
|
||||||
death = self.db.get_event_from_handle(death_ref.ref)
|
if death_ref:
|
||||||
if death and death.get_date_object().get_start_date() != gen.lib.Date.EMPTY:
|
death = self.db.get_event_from_handle(death_ref.ref)
|
||||||
death_date = death.get_date_object()
|
if death and death.get_date_object().get_start_date() != gen.lib.Date.EMPTY:
|
||||||
|
death_date = death.get_date_object()
|
||||||
|
|
||||||
# Look for Cause Of Death, Burial or Cremation events.
|
# Look for Cause Of Death, Burial or Cremation events.
|
||||||
# These are fairly good indications that someone's not alive.
|
# These are fairly good indications that someone's not alive.
|
||||||
if not death_date:
|
if not death_date:
|
||||||
for ev_ref in person.get_primary_event_ref_list():
|
for ev_ref in person.get_primary_event_ref_list():
|
||||||
ev = self.db.get_event_from_handle(ev_ref.ref)
|
if ev_ref:
|
||||||
if ev and ev.type.is_death_fallback():
|
ev = self.db.get_event_from_handle(ev_ref.ref)
|
||||||
death_date = ev.get_date_object()
|
if ev and ev.type.is_death_fallback():
|
||||||
explain = _("death-related evidence")
|
death_date = ev.get_date_object()
|
||||||
|
explain = _("death-related evidence")
|
||||||
|
|
||||||
# If they were born within X years before current year then
|
# If they were born within X years before current year then
|
||||||
# assume they are alive (we already know they are not dead).
|
# assume they are alive (we already know they are not dead).
|
||||||
@ -838,7 +840,7 @@ def probably_alive(person, db,
|
|||||||
return False
|
return False
|
||||||
# FIXME: use match here:
|
# FIXME: use match here:
|
||||||
# if the current_date is before birth, not alive:
|
# if the current_date is before birth, not alive:
|
||||||
if (birth - current_date)[0] >= 0:
|
if (birth - current_date)[0] > 0:
|
||||||
if return_range:
|
if return_range:
|
||||||
return (False, birth, death, explain, relative)
|
return (False, birth, death, explain, relative)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user