bug 9522; fix fault when viewing family events with event gramplet
This commit is contained in:
parent
2947e84501
commit
2bbc8702a7
@ -179,7 +179,6 @@ class PersonEvents(Events):
|
|||||||
Return True if the gramplet has data, else return False.
|
Return True if the gramplet has data, else return False.
|
||||||
"""
|
"""
|
||||||
if active_person:
|
if active_person:
|
||||||
self.cached_start_date = self.get_start_date()
|
|
||||||
if active_person.get_event_ref_list():
|
if active_person.get_event_ref_list():
|
||||||
return True
|
return True
|
||||||
for family_handle in active_person.get_family_handle_list():
|
for family_handle in active_person.get_family_handle_list():
|
||||||
@ -187,8 +186,6 @@ class PersonEvents(Events):
|
|||||||
if family:
|
if family:
|
||||||
for event_ref in family.get_event_ref_list():
|
for event_ref in family.get_event_ref_list():
|
||||||
return True
|
return True
|
||||||
else:
|
|
||||||
self.cached_start_date = None
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def main(self): # return false finishes
|
def main(self): # return false finishes
|
||||||
@ -207,11 +204,14 @@ class PersonEvents(Events):
|
|||||||
"""
|
"""
|
||||||
active_person = self.dbstate.db.get_person_from_handle(active_handle)
|
active_person = self.dbstate.db.get_person_from_handle(active_handle)
|
||||||
if active_person:
|
if active_person:
|
||||||
|
self.cached_start_date = self.get_start_date()
|
||||||
for event_ref in active_person.get_event_ref_list():
|
for event_ref in active_person.get_event_ref_list():
|
||||||
self.add_event_ref(event_ref)
|
self.add_event_ref(event_ref)
|
||||||
for family_handle in active_person.get_family_handle_list():
|
for family_handle in active_person.get_family_handle_list():
|
||||||
family = self.dbstate.db.get_family_from_handle(family_handle)
|
family = self.dbstate.db.get_family_from_handle(family_handle)
|
||||||
self.display_family(family, active_person)
|
self.display_family(family, active_person)
|
||||||
|
else:
|
||||||
|
self.cached_start_date = None
|
||||||
self.set_has_data(self.model.count > 0)
|
self.set_has_data(self.model.count > 0)
|
||||||
|
|
||||||
def display_family(self, family, active_person):
|
def display_family(self, family, active_person):
|
||||||
@ -276,6 +276,7 @@ class FamilyEvents(Events):
|
|||||||
Display the events for the active family.
|
Display the events for the active family.
|
||||||
"""
|
"""
|
||||||
active_family = self.dbstate.db.get_family_from_handle(active_handle)
|
active_family = self.dbstate.db.get_family_from_handle(active_handle)
|
||||||
|
self.cached_start_date = self.get_start_date()
|
||||||
for event_ref in active_family.get_event_ref_list():
|
for event_ref in active_family.get_event_ref_list():
|
||||||
self.add_event_ref(event_ref)
|
self.add_event_ref(event_ref)
|
||||||
self.set_has_data(self.model.count > 0)
|
self.set_has_data(self.model.count > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user