From 5fd545393aa141076a8f1fe696cb118a831e162d Mon Sep 17 00:00:00 2001 From: Logan Hanks Date: Mon, 20 Jun 2011 15:33:16 -0700 Subject: [PATCH] Don't count deletions of already-deleted comments. --- r2/r2/controllers/api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/r2/r2/controllers/api.py b/r2/r2/controllers/api.py index 50b896e72..2288708f7 100644 --- a/r2/r2/controllers/api.py +++ b/r2/r2/controllers/api.py @@ -678,6 +678,7 @@ class ApiController(RedditController): def POST_del(self, thing): if not thing: return '''for deleting all sorts of things''' + was_deleted = thing._deleted thing._deleted = True if (getattr(thing, "promoted", None) is not None and not promote.is_promoted(thing)): @@ -706,7 +707,8 @@ class ApiController(RedditController): if parent_link.is_self: recipient = Account._byID(parent_link.author_id) - delete_comment(thing) + if not was_deleted: + delete_comment(thing) if recipient: inbox_class = Inbox.rel(Account, Comment)