From 026d966e9f47b1eaddd3d4f300752c1e0a75f229 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Mon, 22 Oct 2007 18:46:28 +0000 Subject: [PATCH] 2007-10-22 Benny Malengier * src/GrampsDb/_GrampsInMemDB.py: xml load/save not working, fixed #1319 svn: r9232 --- ChangeLog | 2 ++ src/GrampsDb/_GrampsInMemDB.py | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 27cd130a8..82d5c53a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +2007-10-22 Benny Malengier + * src/GrampsDb/_GrampsInMemDB.py: xml load/save not working, fixed #1319 2007-10-21 Jim Sack * src/ansel_utf8.py: (see tracker issue #831) fix inoperative diff --git a/src/GrampsDb/_GrampsInMemDB.py b/src/GrampsDb/_GrampsInMemDB.py index 0e0e18040..6f268cb7c 100644 --- a/src/GrampsDb/_GrampsInMemDB.py +++ b/src/GrampsDb/_GrampsInMemDB.py @@ -257,7 +257,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):