From dcf100fb61046ffa94e6e1d925c02888e4751cc8 Mon Sep 17 00:00:00 2001 From: Bryce Boe Date: Fri, 2 Mar 2012 15:49:06 -0800 Subject: [PATCH] Indicate comment tree was not built for non-submission comment listings. --- r2/r2/controllers/listingcontroller.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/r2/r2/controllers/listingcontroller.py b/r2/r2/controllers/listingcontroller.py index 7bf83e4d4..0d683f385 100644 --- a/r2/r2/controllers/listingcontroller.py +++ b/r2/r2/controllers/listingcontroller.py @@ -161,8 +161,12 @@ class ListingController(RedditController): if (getattr(c.site, "_id", -1) == get_promote_srid() and not c.user_is_sponsor): abort(403, 'forbidden') - listing = LinkListing(self.builder_obj, show_nums = self.show_nums) - return listing.listing() + pane = LinkListing(self.builder_obj, show_nums = self.show_nums).listing() + # Indicate that the comment tree wasn't built for comments + for i in pane: + if hasattr(i, 'full_comment_path'): + i.child = None + return pane def title(self): """Page """