Geography : HandleError('Handle is None')

This commit is contained in:
SNoiraud 2015-12-26 17:30:38 +01:00
parent 822fa7c06c
commit 99c1cb5642

View File

@ -242,9 +242,12 @@ class GeoEvents(GeoGraphyView):
] ]
if family_list: if family_list:
for family in family_list: for family in family_list:
father = mother = None
hdle = family.get_father_handle() hdle = family.get_father_handle()
if hdle:
father = dbstate.db.get_person_from_handle(hdle) father = dbstate.db.get_person_from_handle(hdle)
hdle = family.get_mother_handle() hdle = family.get_mother_handle()
if hdle:
mother = dbstate.db.get_person_from_handle(hdle) mother = dbstate.db.get_person_from_handle(hdle)
descr2 = ("%(father)s - %(mother)s") % { descr2 = ("%(father)s - %(mother)s") % {
'father': _nd.display(father) if father is not None else "?", 'father': _nd.display(father) if father is not None else "?",