From 049599ca95385fb63b4ed28f2dc4fb502f3b7506 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Sun, 22 Aug 2004 12:37:44 +0000 Subject: [PATCH] (XmlWriter.write_xml_data): Fixed people output by preventing confusion between handles and GRAMPS IDs. svn: r3471 --- gramps2/ChangeLog | 2 ++ gramps2/src/WriteXML.py | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index eeeee63de..7707cc694 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -2,6 +2,8 @@ * src/WriteXML.py (write_xml_data): Fixed typo causing XML export to omit all place definitions. (XmlWriter.write_xml_data): Sort person handles before writing. + (XmlWriter.write_xml_data): Fixed people output by preventing + confusion between handles and GRAMPS IDs. * src/RelLib.py (probably_alive): Fixed typo (bug #1012347). diff --git a/gramps2/src/WriteXML.py b/gramps2/src/WriteXML.py index 79904fd71..b86e01ffa 100644 --- a/gramps2/src/WriteXML.py +++ b/gramps2/src/WriteXML.py @@ -307,11 +307,13 @@ class XmlWriter: frel=' frel="%s"' % alt[2] else: frel='' + parent_family = self.db.get_family_from_handle (alt[0]) self.g.write(" \n" % \ - (alt[0], mrel, frel)) + (parent_family.get_gramps_id (), mrel, frel)) - for family in person.get_family_handle_list(): - self.write_ref("parentin",family,3) + for family_handle in person.get_family_handle_list(): + family = self.db.get_family_from_handle (family_handle) + self.write_ref("parentin",family.get_gramps_id (),3) self.write_note("note",person.get_note_object(),3) for s in person.get_source_references():