4719: Narweb Privacy issue, probably_alive uses spouse birth/death directly
svn: r20935
This commit is contained in:
parent
edc74447d1
commit
7242f9d662
@ -226,13 +226,25 @@ class ProbablyAlive(object):
|
|||||||
if mother_handle == person.handle and father_handle:
|
if mother_handle == person.handle and father_handle:
|
||||||
father = self.db.get_person_from_handle(father_handle)
|
father = self.db.get_person_from_handle(father_handle)
|
||||||
date1, date2, explain, other = self.probably_alive_range(father, is_spouse=True)
|
date1, date2, explain, other = self.probably_alive_range(father, is_spouse=True)
|
||||||
if date1 and date2:
|
if date1 and date1.get_year() != 0:
|
||||||
return date1, date2, _("a spouse, ") + explain, other
|
return (gen.lib.Date().copy_ymd(date1.get_year() - self.AVG_GENERATION_GAP),
|
||||||
|
gen.lib.Date().copy_ymd(date1.get_year() - self.AVG_GENERATION_GAP + self.MAX_AGE_PROB_ALIVE),
|
||||||
|
_("a spouse's birth-related date, ") + explain, other)
|
||||||
|
elif date2 and date2.get_year() != 0:
|
||||||
|
return (gen.lib.Date().copy_ymd(date2.get_year() + self.AVG_GENERATION_GAP - self.MAX_AGE_PROB_ALIVE),
|
||||||
|
gen.lib.Date().copy_ymd(date2.get_year() + self.AVG_GENERATION_GAP),
|
||||||
|
_("a spouse's death-related date, ") + explain, other)
|
||||||
elif father_handle == person.handle and mother_handle:
|
elif father_handle == person.handle and mother_handle:
|
||||||
mother = self.db.get_person_from_handle(mother_handle)
|
mother = self.db.get_person_from_handle(mother_handle)
|
||||||
date1, date2, explain, other = self.probably_alive_range(mother, is_spouse=True)
|
date1, date2, explain, other = self.probably_alive_range(mother, is_spouse=True)
|
||||||
if date1 and date2:
|
if date1 and date1.get_year() != 0:
|
||||||
return date1, date2, _("a spouse, ") + explain, other
|
return (gen.lib.Date().copy_ymd(date1.get_year() - self.AVG_GENERATION_GAP),
|
||||||
|
gen.lib.Date().copy_ymd(date1.get_year() - self.AVG_GENERATION_GAP + self.MAX_AGE_PROB_ALIVE),
|
||||||
|
_("a spouse's birth-related date, ") + explain, other)
|
||||||
|
elif date2 and date2.get_year() != 0:
|
||||||
|
return (gen.lib.Date().copy_ymd(date2.get_year() + self.AVG_GENERATION_GAP - self.MAX_AGE_PROB_ALIVE),
|
||||||
|
gen.lib.Date().copy_ymd(date2.get_year() + self.AVG_GENERATION_GAP),
|
||||||
|
_("a spouse's death-related date, ") + explain, other)
|
||||||
# Let's check the family events and see if we find something
|
# Let's check the family events and see if we find something
|
||||||
for ref in family.get_event_ref_list():
|
for ref in family.get_event_ref_list():
|
||||||
if ref:
|
if ref:
|
||||||
|
Loading…
Reference in New Issue
Block a user