diff --git a/src/tools/common/data_objects.py b/src/tools/common/data_objects.py index b249f2f1..43c6534d 100644 --- a/src/tools/common/data_objects.py +++ b/src/tools/common/data_objects.py @@ -33,6 +33,7 @@ class BlogItem(object): self._tags = None self._groups = None self._comments = None + self._comments_items_list = None @property def id(self): @@ -114,6 +115,16 @@ class BlogItem(object): def comments_node(self): return self.mb_data.get(u'comments_node') + @property + def comments_items_list(self): + return [] if self._comments_items_list is None else self._comments_items_list + + def appendCommentsItems(self, items): + """append comments items to self.comments_items""" + if self._comments_items_list is None: + self._comments_items_list = [] + self._comments_items_list.append(items) + class BlogItems(object):