All objects should return themselves on unserialize()

svn: r19672
This commit is contained in:
Doug Blank 2012-05-27 14:01:09 +00:00
parent 0027f983c0
commit bbd443ba7d
3 changed files with 3 additions and 0 deletions

View File

@ -63,6 +63,7 @@ class MediaBase(object):
Convert a serialized tuple of data to an object.
"""
self.media_list = [MediaRef().unserialize(item) for item in data]
return self
def add_media_reference(self, media_ref):
"""

View File

@ -133,6 +133,7 @@ class MediaObject(CitationBase, NoteBase, DateBase, AttributeBase,
NoteBase.unserialize(self, note_list)
DateBase.unserialize(self, date)
TagBase.unserialize(self, tag_list)
return self
def get_text_data_list(self):
"""

View File

@ -59,6 +59,7 @@ class TagBase(object):
Convert a serialized tuple of data to an object.
"""
self.tag_list = data
return self
def add_tag(self, tag):
"""