From f668c23cf205f62579269b20f8e2149a17ca946b Mon Sep 17 00:00:00 2001 From: Michiel Nauta Date: Thu, 21 Apr 2011 04:56:02 +0000 Subject: [PATCH] 4284: again, fix for parentless family svn: r17174 --- src/Filters/Rules/Person/_HasCommonAncestorWith.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Filters/Rules/Person/_HasCommonAncestorWith.py b/src/Filters/Rules/Person/_HasCommonAncestorWith.py index d6bfc3f3c..e81954ba2 100644 --- a/src/Filters/Rules/Person/_HasCommonAncestorWith.py +++ b/src/Filters/Rules/Person/_HasCommonAncestorWith.py @@ -72,15 +72,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 = {}