* src/plugins/Check.py (check_for_broken_family_links): Check if

child is one of the parents.


svn: r7714
This commit is contained in:
Alex Roitman 2006-11-27 02:55:40 +00:00
parent 96a9dda07e
commit 76d744b1f8
2 changed files with 9 additions and 0 deletions

View File

@ -3,6 +3,8 @@
* po/gramps.pot: updated
2006-11-26 Alex Roitman <shura@gramps-project.org>
* src/plugins/Check.py (check_for_broken_family_links): Check if
child is one of the parents.
* src/GrampsDb/_GrampsBSDDB.py (load): Clean env for a new grdb
file; do not attempt recovery for a new grdb file.
* NEWS: Typo.

View File

@ -354,6 +354,13 @@ class CheckIntegrity:
child_handle = child_ref.ref
child = self.db.get_person_from_handle(child_handle)
if child:
if child_handle in [father_handle,mother_handle]:
# The child is one of the parents: impossible
# Remove such child from the family
family.remove_child_ref(child_ref)
self.db.commit_family(family,self.trans)
self.broken_links.append((child_handle,family_handle))
continue
if family_handle == child.get_main_parents_family_handle():
continue
if family_handle not in \