aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/moderation/tools.py
diff options
context:
space:
mode:
authorJessica Tallon <tsyesika@tsyesika.se>2016-03-01 11:58:38 +0000
committerJessica Tallon <tsyesika@tsyesika.se>2016-03-01 12:04:08 +0000
commit161bc6b2c18f2d20eb759725b2df7fc7ac4a2728 (patch)
tree7e10e43dcc6fcd85e8f9e366f2e10dd0152745bc /mediagoblin/moderation/tools.py
parent1db8690fe9dc625bc648e04493d075cad76689cc (diff)
downloadmediagoblin-161bc6b2c18f2d20eb759725b2df7fc7ac4a2728.tar.lz
mediagoblin-161bc6b2c18f2d20eb759725b2df7fc7ac4a2728.tar.xz
mediagoblin-161bc6b2c18f2d20eb759725b2df7fc7ac4a2728.zip
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.
Diffstat (limited to 'mediagoblin/moderation/tools.py')
-rw-r--r--mediagoblin/moderation/tools.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mediagoblin/moderation/tools.py b/mediagoblin/moderation/tools.py
index 73afd051..36d89d71 100644
--- a/mediagoblin/moderation/tools.py
+++ b/mediagoblin/moderation/tools.py
@@ -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)