Skip to content

Commit 72ccd82

Browse files
committed
Fix Overview for crash when only one parent in family
1 parent 43f91fd commit 72ccd82

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Overview/Overview.gpr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
id="Person Overview",
2828
name=_("Person Overview"),
2929
description = _("Gramplet showing an overview of events for a person"),
30-
version = '1.0.11',
30+
version = '1.0.12',
3131
gramps_target_version="5.1",
3232
status = STABLE,
3333
fname="Overview.py",
@@ -41,7 +41,7 @@
4141
id="Family Overview",
4242
name=_("Family Overview"),
4343
description = _("Gramplet showing an overview of events for a family"),
44-
version = '1.0.11',
44+
version = '1.0.12',
4545
gramps_target_version="5.1",
4646
status = STABLE,
4747
fname="Overview.py",

Overview/Overview.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,12 @@ def display_person(self, active_handle):
183183
family = self.dbstate.db.get_family_from_handle(family_handle)
184184
father_handle = family.get_father_handle()
185185
mother_handle = family.get_mother_handle()
186+
spouse = None
186187
if father_handle == active_handle:
187-
spouse = self.dbstate.db.get_person_from_handle(mother_handle)
188-
else:
188+
if mother_handle:
189+
spouse = self.dbstate.db.get_person_from_handle(
190+
mother_handle)
191+
elif father_handle:
189192
spouse = self.dbstate.db.get_person_from_handle(father_handle)
190193
for event_ref in family.get_event_ref_list():
191194
self.add_event_ref(event_ref, spouse)

0 commit comments

Comments
 (0)