cope with None family in relview

This commit is contained in:
Paul Franklin 2016-04-09 16:47:26 -07:00
parent 61eb2a04a0
commit 0c179a2a47

View File

@ -1748,6 +1748,8 @@ def has_children(db,p):
""" """
for family_handle in p.get_family_handle_list(): for family_handle in p.get_family_handle_list():
family = db.get_family_from_handle(family_handle) family = db.get_family_from_handle(family_handle)
if not family:
continue
childlist = family.get_child_ref_list() childlist = family.get_child_ref_list()
if childlist and len(childlist) > 0: if childlist and len(childlist) > 0:
return True return True