From 6b776c860a7ca167f6b5c7f2397c99066b93e7e0 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Sat, 15 Apr 2006 19:48:12 +0000 Subject: [PATCH] 2006-04-15 Alex Roitman * src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Adapt to ChildRefType. svn: r6347 --- gramps2/ChangeLog | 4 ++++ gramps2/src/GrampsDb/_GrampsBSDDB.py | 7 ++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index b14ac77e6..006670bba 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2006-04-15 Alex Roitman + * src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Adapt to + ChildRefType. + 2006-04-15 Don Allingham * src/DisplayTabs.py: handle child type callback * src/Editors/_EditFamily.py: handle child type callback diff --git a/gramps2/src/GrampsDb/_GrampsBSDDB.py b/gramps2/src/GrampsDb/_GrampsBSDDB.py index d1e02193f..759e668c0 100644 --- a/gramps2/src/GrampsDb/_GrampsBSDDB.py +++ b/gramps2/src/GrampsDb/_GrampsBSDDB.py @@ -1358,10 +1358,7 @@ class GrampsBSDDB(GrampsDbBase): # Person upgrade # Needs to be run after the family upgrade completed. - dummy_child_ref = ChildRef() - default_frel = dummy_child_ref.frel - default_mrel = dummy_child_ref.mrel - + def_rel = ChildRefType._DEFAULT for handle in self.person_map.keys(): info = self.person_map[handle] person = Person() @@ -1423,7 +1420,7 @@ class GrampsBSDDB(GrampsDbBase): for (family_handle,mrel,frel) in parent_family_list: person.parent_family_list.append(family_handle) # Only change family is the relations are non-default - if (mrel,frel) != (default_mrel[0],default_frel[0]): + if (mrel,frel) != (def_rel,def_rel): family = self.get_family_from_handle(family_handle) child_handle_list = [ref.ref for ref in family.child_ref_list]