diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 5cf15cd7f..ea6fbc0f3 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,6 @@ +2005-11-25 Martin Hawlisch + * src/GenericFilter.py (HasCommonAncestorWith): Catch no longer existing person + 2005-11-24 Don Allingham * src/po/template.po: updated translation file diff --git a/gramps2/src/GenericFilter.py b/gramps2/src/GenericFilter.py index ae6fe7a20..155ddb968 100644 --- a/gramps2/src/GenericFilter.py +++ b/gramps2/src/GenericFilter.py @@ -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