From 60f704ef89fe513dff2608380545786c74e95428 Mon Sep 17 00:00:00 2001 From: Bryce Boe Date: Wed, 16 Nov 2011 00:45:20 -0800 Subject: [PATCH] List child comments in MoreCommentsJsonTemplate. --- r2/r2/lib/jsontemplates.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/r2/r2/lib/jsontemplates.py b/r2/r2/lib/jsontemplates.py index f5cbb5965..3bc3d803e 100644 --- a/r2/r2/lib/jsontemplates.py +++ b/r2/r2/lib/jsontemplates.py @@ -369,11 +369,15 @@ class CommentJsonTemplate(ThingJsonTemplate): class MoreCommentJsonTemplate(CommentJsonTemplate): _data_attrs_ = dict(id = "_id36", - name = "_fullname") + name = "_fullname", + children = "children") + def kind(self, wrapped): return "more" def thing_attr(self, thing, attr): + if attr == 'children': + return [to36(x) for x in thing.children] if attr in ('body', 'body_html'): return "" return CommentJsonTemplate.thing_attr(self, thing, attr)