add back comment response flagging

This commit is contained in:
Kevin Chugh
2013-04-05 19:04:18 -04:00
parent de7c511328
commit 24095679a6
4 changed files with 12 additions and 3 deletions

View File

@@ -53,7 +53,7 @@ class Comment(models.Model):
request = perform_request('put', url, params)
voteable.update_attributes(request)
def unFlagAbuse(self, user, voteable):
def unFlagAbuse(self, user, voteable, removeAll):
if voteable.type == 'thread':
url = _url_for_unflag_abuse_thread(voteable.id)
elif voteable.type == 'comment':
@@ -61,6 +61,10 @@ class Comment(models.Model):
else:
raise CommentClientError("Can flag/unflag for threads or comments")
params = {'user_id': user.id}
if removeAll:
params['all'] = True
request = perform_request('put', url, params)
voteable.update_attributes(request)