From 9385c987063a7fa1cd7424cd6ef8ce1a6daee05c Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Fri, 23 Feb 2007 21:17:41 +0000 Subject: [PATCH] 2007-02-23 Alex Roitman * src/GrampsDb/_GrampsBSDDB.py (convert_notes_13): Skip empty notes. svn: r8218 --- ChangeLog | 3 +++ src/GrampsDb/_GrampsBSDDB.py | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 532918a08..5b370a10d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2007-02-23 Alex Roitman + * src/GrampsDb/_GrampsBSDDB.py (convert_notes_13): Skip empty notes. + 2007-02-22 Don Allingham * src/GrampsDbUtils/_GedcomParser.py: fix a few bugs * src/DataViews/_PedigreeView.py: remove redundant call diff --git a/src/GrampsDb/_GrampsBSDDB.py b/src/GrampsDb/_GrampsBSDDB.py index 9dd96ac5a..1f9874710 100644 --- a/src/GrampsDb/_GrampsBSDDB.py +++ b/src/GrampsDb/_GrampsBSDDB.py @@ -2023,8 +2023,10 @@ class GrampsBSDDB(GrampsDbBase,UpdateCallback): if name == 'Note': # Special case: we are way down at the very bottom. # Create note, commit it, return a list with one handle. - (text,format) = obj - if text.strip(): + if (type(obj) == tuple) and (len(obj) > 0) and \ + ('strip' in dir(obj[0])) and (obj[0].strip()): + # Some notes may be None, from early databases. + (text,format) = obj handle = str(self.create_id()) gramps_id = self.find_next_note_gramps_id() note_tuple = (handle,gramps_id,text,format,(0,'',),