diff --git a/files/classes/comment.py b/files/classes/comment.py index 4052a2a632..d4d26b41ea 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -295,8 +295,6 @@ class Comment(Base): if self.level >= 2: data['parent_comment_id'] = self.parent_comment_id - data['replies'] = [x.json_core for x in self.replies()] - return data @property @@ -313,6 +311,7 @@ class Comment(Base): if self.level >= 2: data["parent"]=self.parent.json_core + data['replies'] = [x.json_core for x in self.replies()] return data diff --git a/files/classes/submission.py b/files/classes/submission.py index da106c4673..68344f642a 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -282,7 +282,7 @@ class Submission(Base): if "replies" in self.__dict__: - data["replies"]=[x.json_core for x in self.replies] + data["replies"]=[x.json for x in self.replies] if "voted" in self.__dict__: data["voted"] = self.voted diff --git a/files/routes/notifications.py b/files/routes/notifications.py index 601f7a0d4b..bf0d0b5b65 100644 --- a/files/routes/notifications.py +++ b/files/routes/notifications.py @@ -30,7 +30,7 @@ def unread(v): n.read = True g.db.add(n) - return {"data":[x[1].json for x in listing]} + return {"data":[x[1].json_core for x in listing]}