From 2f142e8966e8603d3bdfc7e74a751f09bc4384b7 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Fri, 12 Aug 2016 21:45:48 -0400 Subject: [PATCH] 9522: events gramplet in family view error: 'FamilyEvents' object has no attribute 'cached_start_date' --- gramps/plugins/gramplet/events.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/gramps/plugins/gramplet/events.py b/gramps/plugins/gramplet/events.py index be0eabe5a..df34183ec 100644 --- a/gramps/plugins/gramplet/events.py +++ b/gramps/plugins/gramplet/events.py @@ -169,11 +169,10 @@ class PersonEvents(Events): def update_has_data(self): active_handle = self.get_active('Person') + active = None if active_handle: active = self.dbstate.db.get_person_from_handle(active_handle) - self.set_has_data(self.get_has_data(active)) - else: - self.set_has_data(False) + self.set_has_data(self.get_has_data(active)) def get_has_data(self, active_person): """ @@ -248,11 +247,10 @@ class FamilyEvents(Events): def update_has_data(self): active_handle = self.get_active('Family') + active = None if active_handle: active = self.dbstate.db.get_family_from_handle(active_handle) - self.set_has_data(self.get_has_data(active)) - else: - self.set_has_data(False) + self.set_has_data(self.get_has_data(active)) def get_has_data(self, active_family): """