diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index d4b1f13cf..9341bff14 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,5 @@ 2006-04-19 Don Allingham + * src/GrampsDb/_DbUtils.py: fix handle vs. ref issues * src/RelLib/_Family.py: add remove_child_handle * src/DataViews/_EventView.py: more GrampsTypes changes * src/DataViews/_PedigreeView.py: more GrampsTypes changes diff --git a/gramps2/src/GrampsDb/_DbUtils.py b/gramps2/src/GrampsDb/_DbUtils.py index f8b8d36cf..bbe971b58 100644 --- a/gramps2/src/GrampsDb/_DbUtils.py +++ b/gramps2/src/GrampsDb/_DbUtils.py @@ -69,12 +69,12 @@ def remove_parent_from_family(db, person_handle, family_handle, trans=None): elif family.get_mother_handle() == person_handle: family.set_mother_handle(None) - child_list = family.get_child_handle_list() + child_list = family.get_child_ref_list() if (not family.get_father_handle() and not family.get_mother_handle() and len(child_list) <= 1): db.remove_family(family_handle, trans) if child_list: - child = db.get_person_from_handle(child_list[0]) + child = db.get_person_from_handle(child_list[0].ref) child.remove_parent_family_handle(family_handle) db.commit_person(child, trans) msg = _("Remove father from family") @@ -102,12 +102,12 @@ def remove_child_from_family(db, person_handle, family_handle, trans=None): else: need_commit = False - child_list = family.get_child_handle_list() + child_list = family.get_child_ref_list() if (not family.get_father_handle() and not family.get_mother_handle() and len(child_list) <= 1): db.remove_family(family_handle, trans) if child_list: - child = db.get_person_from_handle(child_list[0]) + child = db.get_person_from_handle(child_list[0].ref) child.remove_parent_family_handle(family_handle) db.commit_person(child, trans) else: