Geoclose: exception when a family has no father (#662)

This commit is contained in:
Serge Noiraud 2018-09-29 19:20:50 +02:00 committed by GitHub
parent e667431dd5
commit 1b60193f77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -439,9 +439,11 @@ class GeoClose(GeoGraphyView):
fhandle = family_list[0] # first is primary fhandle = family_list[0] # first is primary
fam = dbstate.db.get_family_from_handle(fhandle) fam = dbstate.db.get_family_from_handle(fhandle)
handle = fam.get_father_handle() handle = fam.get_father_handle()
father = dbstate.db.get_person_from_handle(handle) descr1 = " - "
if father: if handle:
descr1 = "%s - " % _nd.display(father) father = dbstate.db.get_person_from_handle(handle)
if father:
descr1 = "%s - " % _nd.display(father)
handle = fam.get_mother_handle() handle = fam.get_mother_handle()
if handle: if handle:
mother = dbstate.db.get_person_from_handle(handle) mother = dbstate.db.get_person_from_handle(handle)