a person is not alive.

svn: r3500
This commit is contained in:
Don Allingham 2004-08-24 04:15:23 +00:00
parent 0e9346bfff
commit aa0165c0a7
2 changed files with 9 additions and 1 deletions

View File

@ -2,7 +2,7 @@
* src/PeopleModel.py: enhanced column_spouse
* src/RelLib.py: enhance probably_alive to check for "Cause
of Death", "Burial", and "Cremation" events to indicate that
a person is not alive.
a person is not alive.
* src/const.py.in: add support for "Marriage Banns"
2004-08-23 Don Allingham <dallingham@users.sourceforge.net>

View File

@ -543,6 +543,14 @@ class Person(PrimaryObject,SourceNote):
"""Returns true if the person may be alive."""
if self.death_handle:
return False
# Look for Cause Of Death, Burial or Cremation events.
# These are fairly good indications that someone's not alive.
for ev_handle in self.event_list:
ev = db.get_event_from_handle(ev_handle)
if ev.name in ["Cause Of Death", "Burial", "Cremation"]:
return 0
if self.birth_handle:
birth = db.get_event_from_handle(self.birth_handle)
if birth.get_date() != "":