From f8d26dede095be63bf9aa306f037b5c20ddff227 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Mon, 22 Oct 2007 18:47:20 +0000 Subject: [PATCH] 2007-10-22 Benny Malengier * src/GrampsDb/_GrampsInMemDB.py: xml load/save not working, fixed #1319 svn: r9233 --- ChangeLog | 3 +++ src/GrampsDb/_GrampsInMemDB.py | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 706e88200..5116eed02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2007-10-22 Benny Malengier + * src/GrampsDb/_GrampsInMemDB.py: xml load/save not working, fixed #1319 + 2007-10-22 Douglas S. Blank * src/ReportBase/_MenuOptions.py: Refactored options, GEPS #005 diff --git a/src/GrampsDb/_GrampsInMemDB.py b/src/GrampsDb/_GrampsInMemDB.py index 1495032e5..9155ecd6b 100644 --- a/src/GrampsDb/_GrampsInMemDB.py +++ b/src/GrampsDb/_GrampsInMemDB.py @@ -254,7 +254,11 @@ class GrampsInMemDB(GrampsDbBase): old_id = old_data[self.ID_INDEX] if old_id is not None and obj.gramps_id != old_id: del trans_map[old_id] - trans_map[gid] = obj.handle + #on load of xml for backref that are encountered before object exists, + #the object is created empty with gid None. Do not add this to + #trans_map. Broken ref will then also not be exported (good!) + if gid is not None: + trans_map[gid] = obj.handle return True def commit_person(self,person,transaction,change_time=None):