* src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Add broken witness note.

svn: r6517
This commit is contained in:
Alex Roitman 2006-05-02 15:19:25 +00:00
parent da286c91af
commit 743dded002
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2006-05-02 Alex Roitman <shura@gramps-project.org>
* src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Add broken
witness note.
2006-05-01 Don Allingham <don@gramps-project.org> 2006-05-01 Don Allingham <don@gramps-project.org>
* src/DataViews/_PersonView.py: view specific key mapping support * src/DataViews/_PersonView.py: view specific key mapping support
* src/ViewManager.py: remember last View * src/ViewManager.py: remember last View

View File

@ -1509,6 +1509,14 @@ class GrampsBSDDB(GrampsDbBase):
event_ref.set_note(witness.comment) event_ref.set_note(witness.comment)
person.event_ref_list.append(event_ref) person.event_ref_list.append(event_ref)
self.commit_person(person,trans) 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) self.commit_event(event,trans)
current += 1 current += 1
self.update(100*current/length) self.update(100*current/length)