Protection from a bad child drop

svn: r15785
This commit is contained in:
Doug Blank 2010-08-21 20:18:42 +00:00
parent 01e354f18d
commit 1b884b129d

View File

@ -56,23 +56,24 @@ class ChildModel(gtk.ListStore):
index = 1
for child_ref in self.get_data():
child = db.get_person_from_handle(child_ref.ref)
self.append(row=[
index,
child.get_gramps_id(),
name_displayer.display(child),
Utils.gender[child.get_gender()],
str(child_ref.get_father_relation()),
str(child_ref.get_mother_relation()),
self.column_birth_day(child),
self.column_death_day(child),
self.column_birth_place(child),
self.column_death_place(child),
child.get_handle(),
name_displayer.sort_string(child.primary_name),
self.column_birth_sort(child),
self.column_death_sort(child),
])
index += 1
if child:
self.append(row=[
index,
child.get_gramps_id(),
name_displayer.display(child),
Utils.gender[child.get_gender()],
str(child_ref.get_father_relation()),
str(child_ref.get_mother_relation()),
self.column_birth_day(child),
self.column_death_day(child),
self.column_birth_place(child),
self.column_death_place(child),
child.get_handle(),
name_displayer.sort_string(child.primary_name),
self.column_birth_sort(child),
self.column_death_sort(child),
])
index += 1
def get_data(self):
return self.family.get_child_ref_list()