Update
svn: r5877
This commit is contained in:
parent
996295cd11
commit
a8d9047057
@ -57,6 +57,7 @@ class Note(BaseObject):
|
|||||||
return (self.text,self.format)
|
return (self.text,self.format)
|
||||||
|
|
||||||
def unserialize(self,data):
|
def unserialize(self,data):
|
||||||
|
if data is not None:
|
||||||
(self.text,self.format) = data
|
(self.text,self.format) = data
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
@ -49,21 +49,16 @@ class NoteBase:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if source and source.note:
|
if source and source.note:
|
||||||
self.note = Note(source.note.get())
|
text = source.note.get()
|
||||||
else:
|
else:
|
||||||
self.note = None
|
text = ""
|
||||||
|
self.note = Note(text)
|
||||||
|
|
||||||
def serialize(self):
|
def serialize(self):
|
||||||
if self.note == None:
|
return self.note.serialize()
|
||||||
note = None
|
|
||||||
else:
|
|
||||||
note = self.note.serialize()
|
|
||||||
return note
|
|
||||||
|
|
||||||
def unserialize(self,data):
|
def unserialize(self,data):
|
||||||
if data == None:
|
if data is not None:
|
||||||
self.note = None
|
|
||||||
else:
|
|
||||||
self.note = Note().unserialize(data)
|
self.note = Note().unserialize(data)
|
||||||
|
|
||||||
def set_note(self,text):
|
def set_note(self,text):
|
||||||
|
Loading…
Reference in New Issue
Block a user