4284: again, fix for parentless family
svn: r17173
This commit is contained in:
parent
0fd3a1c87e
commit
c031a65944
@ -75,15 +75,19 @@ class HasCommonAncestorWith(Rule):
|
||||
return
|
||||
|
||||
for fam_handle in person.get_parent_family_handle_list():
|
||||
parentless_fam = True
|
||||
fam = db.get_family_from_handle(fam_handle)
|
||||
if fam:
|
||||
for par_handle in (fam.get_father_handle(), fam.get_mother_handle()):
|
||||
if par_handle:
|
||||
parentless_fam = False
|
||||
par = db.get_person_from_handle(par_handle)
|
||||
if par and par.handle not in self.ancestor_cache:
|
||||
self.add_ancs(db, par)
|
||||
if par:
|
||||
self.ancestor_cache[person.handle] |= self.ancestor_cache[par.handle]
|
||||
if parentless_fam:
|
||||
self.ancestor_cache[person.handle].add(fam_handle)
|
||||
|
||||
def reset(self):
|
||||
self.ancestor_cache = {}
|
||||
|
Loading…
Reference in New Issue
Block a user