From bb31bd5d8fc7ab85f6b529ef42a23456121e154b Mon Sep 17 00:00:00 2001 From: Brian Simpson Date: Fri, 21 Mar 2014 17:07:34 -0400 Subject: [PATCH] UserController: check item._deleted rather than item.deleted. Comment.add_props can overwrite comment.deleted to be False even when comment._deleted is True. --- r2/r2/controllers/listingcontroller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r2/r2/controllers/listingcontroller.py b/r2/r2/controllers/listingcontroller.py index a465a9b32..b86cc253f 100755 --- a/r2/r2/controllers/listingcontroller.py +++ b/r2/r2/controllers/listingcontroller.py @@ -584,7 +584,7 @@ class UserController(ListingController): if self.where == 'gilded' and item.gildings <= 0: return False - if self.where == 'deleted' and not getattr(item, 'deleted', False): + if self.where == 'deleted' and not item._deleted: return False is_promoted = getattr(item, "promoted", None) is not None