Skip to content

Commit 0ea07a9

Browse files
committed
Fix Overview Gramplet for HandleError
Fixes #11144
1 parent 9044608 commit 0ea07a9

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-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.8',
30+
version = '1.0.9',
3131
gramps_target_version="5.0",
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.8',
44+
version = '1.0.9',
4545
gramps_target_version="5.0",
4646
status = STABLE,
4747
fname="Overview.py",

Overview/Overview.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ def active_changed(self, handle):
144144

145145
def update_has_data(self):
146146
active_handle = self.get_active('Person')
147-
active = self.dbstate.db.get_person_from_handle(active_handle)
147+
if active_handle:
148+
active = self.dbstate.db.get_person_from_handle(active_handle)
149+
else:
150+
active = None
148151
self.set_has_data(self.get_has_data(active))
149152

150153
def get_has_data(self, active_person):
@@ -198,7 +201,10 @@ def db_changed(self):
198201

199202
def update_has_data(self):
200203
active_handle = self.get_active('Family')
201-
active = self.dbstate.db.get_family_from_handle(active_handle)
204+
if active_handle:
205+
active = self.dbstate.db.get_family_from_handle(active_handle)
206+
else:
207+
active = None
202208
self.set_has_data(self.get_has_data(active))
203209

204210
def get_has_data(self, active_family):

0 commit comments

Comments
 (0)