* src/GenericFilter.py (HasCommonAncestorWith): Catch no longer existing person
svn: r5437
This commit is contained in:
parent
63c4ca9553
commit
f221703095
@ -1,3 +1,6 @@
|
||||
2005-11-25 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||
* src/GenericFilter.py (HasCommonAncestorWith): Catch no longer existing person
|
||||
|
||||
2005-11-24 Don Allingham <don@gramps-project.org>
|
||||
* src/po/template.po: updated translation file
|
||||
|
||||
|
@ -927,10 +927,13 @@ class HasCommonAncestorWith(Rule):
|
||||
|
||||
def init_ancestor_cache(self,db):
|
||||
# list[0] is an Id, but we need to pass a Person to for_each_ancestor.
|
||||
handle = db.get_person_from_gramps_id(self.list[0]).get_handle()
|
||||
if handle:
|
||||
def init(self,handle): self.ancestor_cache[handle] = 1
|
||||
for_each_ancestor(db,[handle],init,self)
|
||||
try:
|
||||
handle = db.get_person_from_gramps_id(self.list[0]).get_handle()
|
||||
if handle:
|
||||
def init(self,handle): self.ancestor_cache[handle] = 1
|
||||
for_each_ancestor(db,[handle],init,self)
|
||||
except:
|
||||
pass
|
||||
|
||||
def apply(self,db,person):
|
||||
# On the first call, we build the ancestor cache for the
|
||||
|
Loading…
Reference in New Issue
Block a user