Fix for when active_handle is ''
svn: r23297
This commit is contained in:
parent
98edfd2848
commit
6bb98bb230
@ -77,9 +77,9 @@ class Ancestor(Gramplet):
|
|||||||
"""
|
"""
|
||||||
Return True if the gramplet has data, else return False.
|
Return True if the gramplet has data, else return False.
|
||||||
"""
|
"""
|
||||||
if active_handle is None:
|
if active_handle:
|
||||||
return False
|
|
||||||
person = self.dbstate.db.get_person_from_handle(active_handle)
|
person = self.dbstate.db.get_person_from_handle(active_handle)
|
||||||
|
if person:
|
||||||
family_handle = person.get_main_parents_family_handle()
|
family_handle = person.get_main_parents_family_handle()
|
||||||
family = self.dbstate.db.get_family_from_handle(family_handle)
|
family = self.dbstate.db.get_family_from_handle(family_handle)
|
||||||
if family and (family.get_father_handle() or
|
if family and (family.get_father_handle() or
|
||||||
|
@ -77,11 +77,12 @@ class Descendant(Gramplet):
|
|||||||
"""
|
"""
|
||||||
Return True if the gramplet has data, else return False.
|
Return True if the gramplet has data, else return False.
|
||||||
"""
|
"""
|
||||||
if active_handle is None:
|
if active_handle:
|
||||||
return False
|
|
||||||
person = self.dbstate.db.get_person_from_handle(active_handle)
|
person = self.dbstate.db.get_person_from_handle(active_handle)
|
||||||
|
if person:
|
||||||
for family_handle in person.get_family_handle_list():
|
for family_handle in person.get_family_handle_list():
|
||||||
family = self.dbstate.db.get_family_from_handle(family_handle)
|
family = self.dbstate.db.get_family_from_handle(family_handle)
|
||||||
|
if family:
|
||||||
for child_ref in family.get_child_ref_list():
|
for child_ref in family.get_child_ref_list():
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user