From bbd443ba7d6e588fd6dee57b836f6204efc283ea Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 27 May 2012 14:01:09 +0000 Subject: [PATCH] All objects should return themselves on unserialize() svn: r19672 --- src/gen/lib/mediabase.py | 1 + src/gen/lib/mediaobj.py | 1 + src/gen/lib/tagbase.py | 1 + 3 files changed, 3 insertions(+) diff --git a/src/gen/lib/mediabase.py b/src/gen/lib/mediabase.py index cbb47a0b8..d04572f79 100644 --- a/src/gen/lib/mediabase.py +++ b/src/gen/lib/mediabase.py @@ -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): """ diff --git a/src/gen/lib/mediaobj.py b/src/gen/lib/mediaobj.py index 7af2d2a5c..daf6fcc6e 100644 --- a/src/gen/lib/mediaobj.py +++ b/src/gen/lib/mediaobj.py @@ -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): """ diff --git a/src/gen/lib/tagbase.py b/src/gen/lib/tagbase.py index f04992fe7..29c2c7913 100644 --- a/src/gen/lib/tagbase.py +++ b/src/gen/lib/tagbase.py @@ -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): """