diff --git a/ChangeLog b/ChangeLog index cabd5d332..3cadf5dde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-07-17 Alex Roitman + * src/GrampsDb/_GrampsBSDDB.py (convert_notes_13): Only create a + note if source text was non-empty. + 2007-07-17 Zsolt Foldvari * src/Spell.py: * src/Editors/_EditNote.py: diff --git a/src/GrampsDb/_GrampsBSDDB.py b/src/GrampsDb/_GrampsBSDDB.py index d8930d0f5..ff468744f 100644 --- a/src/GrampsDb/_GrampsBSDDB.py +++ b/src/GrampsDb/_GrampsBSDDB.py @@ -2072,13 +2072,14 @@ class GrampsBSDDB(GrampsDbBase, UpdateCallback): nttype=NoteType.SOURCEREF, private=priv) # Also we lose the text field and make it a note - handle = str(self.create_id()) - gramps_id = self.find_next_note_gramps_id() - note_tuple = (handle, gramps_id, text, Note.FLOWED, - (NoteType.SOURCE_TEXT, '', ), self.change_13, - (-1, '', ), priv) - self.commit_13(note_tuple, NOTE_KEY, self.note_map, []) - note_list += [handle] + if text.strip(): + handle = str(self.create_id()) + gramps_id = self.find_next_note_gramps_id() + note_tuple = (handle, gramps_id, text, Note.FLOWED, + (NoteType.SOURCE_TEXT, '', ), self.change_13, + (-1, '', ), priv) + self.commit_13(note_tuple, NOTE_KEY, self.note_map, []) + note_list += [handle] new_obj = (date, priv, note_list, conf, ref, page) elif name == 'Attribute': (priv, source_list, note, the_type, value) = obj