* src/Check.py: repair family types of "None" in the database
svn: r4332
This commit is contained in:
parent
7a2634c8fa
commit
9ed9f57c21
@ -1,4 +1,5 @@
|
|||||||
2005-04-10 Don Allingham <don@gramps-project.org>
|
2005-04-10 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/Check.py: repair family types of "None" in the database
|
||||||
* src/Makefile.am: add MergePeople.py
|
* src/Makefile.am: add MergePeople.py
|
||||||
|
|
||||||
2005-04-09 Don Allingham <don@gramps-project.org>
|
2005-04-09 Don Allingham <don@gramps-project.org>
|
||||||
|
@ -157,6 +157,10 @@ class CheckIntegrity:
|
|||||||
person = self.db.get_person_from_handle(person_handle)
|
person = self.db.get_person_from_handle(person_handle)
|
||||||
for family_type in person.get_parent_family_handle_list():
|
for family_type in person.get_parent_family_handle_list():
|
||||||
family = self.db.get_family_from_handle(family_type[0])
|
family = self.db.get_family_from_handle(family_type[0])
|
||||||
|
if not family:
|
||||||
|
person.remove_parent_family_handle(family_type[0])
|
||||||
|
self.db.commit_person(person,self.trans)
|
||||||
|
continue
|
||||||
for child_handle in family.get_child_handle_list():
|
for child_handle in family.get_child_handle_list():
|
||||||
if child_handle == person_handle:
|
if child_handle == person_handle:
|
||||||
break
|
break
|
||||||
@ -413,8 +417,11 @@ class CheckIntegrity:
|
|||||||
cn = person.get_primary_name().get_name()
|
cn = person.get_primary_name().get_name()
|
||||||
else:
|
else:
|
||||||
cn = _("Non existing child")
|
cn = _("Non existing child")
|
||||||
family = self.db.get_family_from_handle(family_handle)
|
try:
|
||||||
pn = Utils.family_name(family,self.db)
|
family = self.db.get_family_from_handle(family_handle)
|
||||||
|
pn = Utils.family_name(family,self.db)
|
||||||
|
except:
|
||||||
|
pn = _("Unknown")
|
||||||
self.text.write('\t')
|
self.text.write('\t')
|
||||||
self.text.write(_("%s was removed from the family of %s\n") % (cn,pn))
|
self.text.write(_("%s was removed from the family of %s\n") % (cn,pn))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user