From 6890fc43248dbd7154afc05950515f6972419f57 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Sat, 11 Jun 2016 20:28:47 -0700 Subject: [PATCH] 9517: [In "Verify" people w/ death event w/o date are not thought dead] --- gramps/plugins/tool/verify.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/gramps/plugins/tool/verify.py b/gramps/plugins/tool/verify.py index a3f61d444..fb10734e7 100644 --- a/gramps/plugins/tool/verify.py +++ b/gramps/plugins/tool/verify.py @@ -173,6 +173,19 @@ def get_birth_date(db, person, estimate=False): ret = 0 if ret is None else ret return ret +def get_death(db, person): + """ + boolean whether there is a death event or not + (if a user claims a person is dead, we will believe it even with no date) + """ + if not person: + return False + death_ref = person.get_death_ref() + if death_ref: + return True + else: + return False + def get_death_date(db, person, estimate=False): if not person: return 0 @@ -1578,8 +1591,9 @@ class OldAgeButNoDeath(PersonRule): def broken(self): birth_date = get_birth_date(self.db,self.obj,self.est) - dead = get_death_date(self.db,self.obj,True) # if no death use burial - if dead or not birth_date: + dead = get_death(self.db, self.obj) + death_date = get_death_date(self.db, self.obj, True) # use burial ... + if dead or death_date or not birth_date: return 0 age = ( _today - birth_date ) / 365 return ( age > self.old_age )