From 743dded002623a9321f123820e912569ceabf3a0 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Tue, 2 May 2006 15:19:25 +0000 Subject: [PATCH] * src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Add broken witness note. svn: r6517 --- ChangeLog | 4 ++++ src/GrampsDb/_GrampsBSDDB.py | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index ce83eaf58..472ff8f59 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-05-02 Alex Roitman + * src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Add broken + witness note. + 2006-05-01 Don Allingham * src/DataViews/_PersonView.py: view specific key mapping support * src/ViewManager.py: remember last View diff --git a/src/GrampsDb/_GrampsBSDDB.py b/src/GrampsDb/_GrampsBSDDB.py index ad347bca4..55c4a4ae9 100644 --- a/src/GrampsDb/_GrampsBSDDB.py +++ b/src/GrampsDb/_GrampsBSDDB.py @@ -1509,6 +1509,14 @@ class GrampsBSDDB(GrampsDbBase): event_ref.set_note(witness.comment) person.event_ref_list.append(event_ref) self.commit_person(person,trans) + else: + # Broken witness: dangling witness handle + # with no corresponding person in the db + note_text = event.get_note() + "\n" + \ + _("Broken witness reference detected " + "while upgrading database to version 9.") + event.set_note(note_text) + self.commit_event(event,trans) current += 1 self.update(100*current/length)