diff --git a/files/helpers/actions.py b/files/helpers/actions.py index 306700741..05e369b38 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -443,7 +443,7 @@ def execute_antispam_post_check(title, v, url): post.is_pinned = False post.ban_reason = "AutoJanny" g.db.add(post) - ma=ModAction( + ma = ModAction( user_id=AUTOJANNY_ID, target_post_id=post.id, kind="ban_post", @@ -503,7 +503,7 @@ def execute_antispam_comment_check(body, v): comment.is_banned = True comment.ban_reason = "AutoJanny" g.db.add(comment) - ma=ModAction( + ma = ModAction( user_id=AUTOJANNY_ID, target_comment_id=comment.id, kind="ban_comment", diff --git a/files/routes/admin.py b/files/routes/admin.py index d2be35a73..681a7a814 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1402,7 +1402,7 @@ def approve_post(post_id, v): abort(400, "You can't bypass the chud award!") if post.is_banned: - ma=ModAction( + ma = ModAction( kind="unban_post", user_id=v.id, target_post_id=post.id, @@ -1523,7 +1523,7 @@ def unsticky_post(post_id, v): post.stickied_utc = None g.db.add(post) - ma=ModAction( + ma = ModAction( kind="unpin_post", user_id=v.id, target_post_id=post.id @@ -1555,7 +1555,7 @@ def sticky_comment(cid, v): comment.stickied = v.username g.db.add(comment) - ma=ModAction( + ma = ModAction( kind="pin_comment", user_id=v.id, target_comment_id=comment.id @@ -1588,7 +1588,7 @@ def unsticky_comment(cid, v): comment.stickied_utc = None g.db.add(comment) - ma=ModAction( + ma = ModAction( kind="unpin_comment", user_id=v.id, target_comment_id=comment.id @@ -1644,7 +1644,7 @@ def approve_comment(c_id, v): abort(400, "You can't bypass the chud award!") if comment.is_banned: - ma=ModAction( + ma = ModAction( kind="unban_comment", user_id=v.id, target_comment_id=comment.id, diff --git a/files/routes/comments.py b/files/routes/comments.py index cb73a0b49..1747e8ce4 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -703,7 +703,7 @@ def edit_comment(cid, v): if int(time.time()) - c.created_utc > 60 * 3: c.edited_utc = int(time.time()) else: - ma=ModAction( + ma = ModAction( kind="edit_comment", user_id=v.id, target_comment_id=c.id diff --git a/files/routes/posts.py b/files/routes/posts.py index aed9968e7..7079a2e2d 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1058,7 +1058,7 @@ def edit_post(pid, v): if int(time.time()) - p.created_utc > 60 * 3: p.edited_utc = int(time.time()) else: - ma=ModAction( + ma = ModAction( kind="edit_post", user_id=v.id, target_post_id=p.id diff --git a/files/routes/reporting.py b/files/routes/reporting.py index 07a9673da..e09986e89 100644 --- a/files/routes/reporting.py +++ b/files/routes/reporting.py @@ -35,7 +35,7 @@ def report_post(pid, v): post.flair = reason_html[1:] g.db.add(post) if v.admin_level >= PERMS['POST_COMMENT_MODERATION']: - ma=ModAction( + ma = ModAction( kind="flair_post", user_id=v.id, target_post_id=post.id, @@ -128,7 +128,7 @@ def remove_report_post(v, pid, uid): g.db.delete(report) if v.id != report.user_id: - ma=ModAction( + ma = ModAction( kind="delete_report", user_id=v.id, target_post_id=pid @@ -154,7 +154,7 @@ def remove_report_comment(v, cid, uid): g.db.delete(report) if v.id != report.user_id: - ma=ModAction( + ma = ModAction( kind="delete_report", user_id=v.id, target_comment_id=cid