Fix Relationship path between filter for silent fail (#586)

Fixes #10509
This commit is contained in:
Paul Culley 2018-03-26 21:18:56 -05:00 committed by Sam Manzi
parent fd55f0abff
commit ca9df38b11

View File

@ -55,7 +55,7 @@ class RelationshipPathBetween(Rule):
try: try:
root1_handle = db.get_person_from_gramps_id(self.list[0]).get_handle() root1_handle = db.get_person_from_gramps_id(self.list[0]).get_handle()
root2_handle = db.get_person_from_gramps_id(self.list[1]).get_handle() root2_handle = db.get_person_from_gramps_id(self.list[1]).get_handle()
self.init_list(root1_handle,root2_handle) self.init_list(root1_handle, root2_handle)
except: except:
pass pass
@ -82,6 +82,8 @@ class RelationshipPathBetween(Rule):
pmap[person.get_handle()] = rank pmap[person.get_handle()] = rank
fam_id = person.get_main_parents_family_handle() fam_id = person.get_main_parents_family_handle()
if not fam_id:
return
family = self.db.get_family_from_handle(fam_id) family = self.db.get_family_from_handle(fam_id)
if family is not None: if family is not None:
self.apply_filter(rank+1, family.get_father_handle(), plist, pmap) self.apply_filter(rank+1, family.get_father_handle(), plist, pmap)