From d43fc261696a0c512cbd1d05d923ffb0d3bb9450 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Fri, 29 Feb 2008 09:02:43 +0000 Subject: [PATCH] 2008-02-29 Benny Malengier * src/GrampsDbUtils/_GedcomParse.py: find_family_from_handle returns tuple * src/Editors/_EditPerson.py: don't use find_person but get_person 2008-02-29 Raphael Ackermann 2008-02-28 Jim Sack svn: r10142 --- ChangeLog | 8 ++++++-- src/Editors/_EditPerson.py | 8 ++++---- src/GrampsDbUtils/_GedcomParse.py | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 29df6d08a..088cbb600 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,12 @@ -2008-02-27 Raphael Ackermann +2008-02-29 Benny Malengier + * src/GrampsDbUtils/_GedcomParse.py: find_family_from_handle returns tuple + * src/Editors/_EditPerson.py: don't use find_person but get_person + +2008-02-29 Raphael Ackermann * src/plugins/Makefile.am: add CmdRef.py and DateParserDisplayTest.py to get make distcheck to run through. -2008--2-28 Jim Sack +2008-02-28 Jim Sack * src/GrampsDbUtils/_GedcomParse.py fix oversight from r10099 where eprefix was changed to event_prefix in gen/db/base.py (problem detected with unittest gramps_cli_test.py .. yay!) diff --git a/src/Editors/_EditPerson.py b/src/Editors/_EditPerson.py index 95a94a153..dce036765 100644 --- a/src/Editors/_EditPerson.py +++ b/src/Editors/_EditPerson.py @@ -609,17 +609,17 @@ class EditPerson(EditPrimary): if gender >= 0: self.obj.set_gender(gender) - def _update_family_ids(self, trans): + def _update_family_ids(self): # Update each of the families child lists to reflect any # change in ordering due to the new birth date family = self.obj.get_main_parents_family_handle() if (family): - f = self.db.find_family_from_handle(family, trans) + f = self.db.get_family_from_handle(family) new_order = self.reorder_child_ref_list(self.obj, f.get_child_ref_list()) f.set_child_ref_list(new_order) for family in self.obj.get_parent_family_handle_list(): - f = self.db.find_family_from_handle(family, trans) + f = self.db.get_family_from_handle(family) new_order = self.reorder_child_ref_list(self.obj, f.get_child_ref_list()) f.set_child_ref_list(new_order) @@ -703,7 +703,7 @@ class EditPerson(EditPrimary): trans = self.db.transaction_begin() - self._update_family_ids(trans) + self._update_family_ids() if not self.obj.get_handle(): self.db.add_person(self.obj, trans) diff --git a/src/GrampsDbUtils/_GedcomParse.py b/src/GrampsDbUtils/_GedcomParse.py index b6b05f4e0..ac99d78d9 100644 --- a/src/GrampsDbUtils/_GedcomParse.py +++ b/src/GrampsDbUtils/_GedcomParse.py @@ -2191,7 +2191,7 @@ class GedcomParser(UpdateCallback): state.person.add_parent_family_handle(handle) # search childrefs - family = self.dbase.find_family_from_handle(handle, self.trans) + family, new = self.dbase.find_family_from_handle(handle, self.trans) family.set_gramps_id(gid) for ref in family.get_child_ref_list(): @@ -3258,7 +3258,7 @@ class GedcomParser(UpdateCallback): frel = mrel = gen.lib.ChildRefType.BIRTH - family = self.dbase.find_family_from_handle(handle, self.trans) + family, new = self.dbase.find_family_from_handle(handle, self.trans) reflist = [ ref for ref in family.get_child_ref_list() \ if ref.ref == state.person.handle ] if reflist: