From a8d90470574b197dc405d8216c9c5d1caa7ee590 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Fri, 3 Feb 2006 22:31:46 +0000 Subject: [PATCH] Update svn: r5877 --- gramps2/src/RelLib/_Note.py | 3 ++- gramps2/src/RelLib/_NoteBase.py | 15 +++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/gramps2/src/RelLib/_Note.py b/gramps2/src/RelLib/_Note.py index ce4610b95..b079d4a87 100644 --- a/gramps2/src/RelLib/_Note.py +++ b/gramps2/src/RelLib/_Note.py @@ -57,7 +57,8 @@ class Note(BaseObject): return (self.text,self.format) def unserialize(self,data): - (self.text,self.format) = data + if data is not None: + (self.text,self.format) = data return self def get_text_data_list(self): diff --git a/gramps2/src/RelLib/_NoteBase.py b/gramps2/src/RelLib/_NoteBase.py index 6084701d4..aaa8be252 100644 --- a/gramps2/src/RelLib/_NoteBase.py +++ b/gramps2/src/RelLib/_NoteBase.py @@ -49,21 +49,16 @@ class NoteBase: """ if source and source.note: - self.note = Note(source.note.get()) + text = source.note.get() else: - self.note = None + text = "" + self.note = Note(text) def serialize(self): - if self.note == None: - note = None - else: - note = self.note.serialize() - return note + return self.note.serialize() def unserialize(self,data): - if data == None: - self.note = None - else: + if data is not None: self.note = Note().unserialize(data) def set_note(self,text):