7299: Fix bug when family has no parents
This commit is contained in:
parent
53b415c0d0
commit
d0a83dd39c
@ -282,11 +282,6 @@ class PlaceReport(Report):
|
|||||||
person = self.database.get_person_from_handle(ref_handle)
|
person = self.database.get_person_from_handle(ref_handle)
|
||||||
nameEntry = "%s (%s)" % (self._nd.display(person),
|
nameEntry = "%s (%s)" % (self._nd.display(person),
|
||||||
person.get_gramps_id())
|
person.get_gramps_id())
|
||||||
if nameEntry in person_dict:
|
|
||||||
person_dict[nameEntry].append(evt_handle)
|
|
||||||
else:
|
|
||||||
person_dict[nameEntry] = []
|
|
||||||
person_dict[nameEntry].append(evt_handle)
|
|
||||||
else:
|
else:
|
||||||
family = self.database.get_family_from_handle(ref_handle)
|
family = self.database.get_family_from_handle(ref_handle)
|
||||||
f_handle = family.get_father_handle()
|
f_handle = family.get_father_handle()
|
||||||
@ -300,7 +295,7 @@ class PlaceReport(Report):
|
|||||||
'father_id' : father.get_gramps_id(),
|
'father_id' : father.get_gramps_id(),
|
||||||
'mother' : self._nd.display(mother),
|
'mother' : self._nd.display(mother),
|
||||||
'mother_id' : mother.get_gramps_id()}
|
'mother_id' : mother.get_gramps_id()}
|
||||||
else:
|
elif f_handle or m_handle:
|
||||||
if f_handle:
|
if f_handle:
|
||||||
p_handle = f_handle
|
p_handle = f_handle
|
||||||
else:
|
else:
|
||||||
@ -310,12 +305,15 @@ class PlaceReport(Report):
|
|||||||
nameEntry = "%s (%s)" % \
|
nameEntry = "%s (%s)" % \
|
||||||
(self._nd.display(person),
|
(self._nd.display(person),
|
||||||
person.get_gramps_id())
|
person.get_gramps_id())
|
||||||
|
|
||||||
if nameEntry in person_dict:
|
|
||||||
person_dict[nameEntry].append(evt_handle)
|
|
||||||
else:
|
else:
|
||||||
person_dict[nameEntry] = []
|
# No parents - bug #7299
|
||||||
person_dict[nameEntry].append(evt_handle)
|
continue
|
||||||
|
|
||||||
|
if nameEntry in person_dict:
|
||||||
|
person_dict[nameEntry].append(evt_handle)
|
||||||
|
else:
|
||||||
|
person_dict[nameEntry] = []
|
||||||
|
person_dict[nameEntry].append(evt_handle)
|
||||||
|
|
||||||
keys = list(person_dict.keys())
|
keys = list(person_dict.keys())
|
||||||
keys.sort()
|
keys.sort()
|
||||||
@ -329,6 +327,10 @@ class PlaceReport(Report):
|
|||||||
date = self._get_date(event.get_date_object())
|
date = self._get_date(event.get_date_object())
|
||||||
descr = event.get_description()
|
descr = event.get_description()
|
||||||
event_type = self._(self._get_type(event.get_type()))
|
event_type = self._(self._get_type(event.get_type()))
|
||||||
|
else:
|
||||||
|
date = ''
|
||||||
|
descr = ''
|
||||||
|
event_type = ''
|
||||||
event_details = [people, event_type, descr, date]
|
event_details = [people, event_type, descr, date]
|
||||||
self.doc.start_row()
|
self.doc.start_row()
|
||||||
for detail in event_details:
|
for detail in event_details:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user