From a5d8a0cfe1fc762fdced5a1fbe9863139334edab Mon Sep 17 00:00:00 2001 From: Srijan Choudhary Date: Wed, 23 Apr 2014 00:57:31 +0530 Subject: [PATCH] Change in API: hidden_replies field instead of passed_replies --- isso/views/comments.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/isso/views/comments.py b/isso/views/comments.py index 658b381..52d72e6 100644 --- a/isso/views/comments.py +++ b/isso/views/comments.py @@ -356,19 +356,19 @@ class API(object): rv = { 'id' : root_id, - 'passed_replies' : len(root_list), 'total_replies' : reply_counts[root_id], + 'hidden_replies' : reply_counts[root_id] - len(root_list), 'replies' : self.process_fetched_list(root_list, plain) } # We are only checking for one level deep comments if root_id is None: for comment in rv['replies']: replies = [i for i in full_list if i['parent'] == comment['id']] - comment['passed_replies'] = len(replies) if comment['id'] in reply_counts: comment['total_replies'] = reply_counts[comment['id']] else: comment['total_replies'] = 0 + comment['hidden_replies'] = comment['total_replies'] - len(replies) comment['replies'] = self.process_fetched_list(replies, plain) return JSON(rv, 200)