Fix #5376 - Ensure links have correct ID

This ensures that links to comments have the correct ID (the
ID of the Comment object) as well as fixing deletion on reports
and fixing a few other little things. I hope this fixes the #5376
issue, though cannot reproduce so unable to confirm.
This commit is contained in:
Jessica Tallon
2016-03-01 11:58:38 +00:00
parent 1db8690fe9
commit 161bc6b2c1
7 changed files with 25 additions and 24 deletions

View File

@@ -69,7 +69,7 @@ def take_punitive_actions(request, form, report, user):
if u'delete' in form.action_to_resolve.data and \
report.is_comment_report():
deleted_comment = report.obj()
Session.delete(deleted_comment)
deleted_comment.delete()
form.resolution_content.data += \
_(u"\n{mod} deleted the comment.").format(
mod=request.user.username)