From b71d55cfb9f2329f542a01fbceadd6fef9187f57 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 20 Aug 2022 22:14:20 +0200 Subject: [PATCH] don't show jannies flairing in the modlog --- files/routes/reporting.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/files/routes/reporting.py b/files/routes/reporting.py index 08d4b705b..cf6122dc4 100644 --- a/files/routes/reporting.py +++ b/files/routes/reporting.py @@ -29,13 +29,14 @@ def flag_post(pid, v): if reason.startswith('!') and (v.admin_level > 1 or post.sub and v.mods(post.sub)): post.flair = reason[1:] g.db.add(post) - ma=ModAction( - kind="flair_post", - user_id=v.id, - target_submission_id=post.id, - _note=f'"{post.flair}"' - ) - g.db.add(ma) + if v.admin_level > 1: + ma=ModAction( + kind="flair_post", + user_id=v.id, + target_submission_id=post.id, + _note=f'"{post.flair}"' + ) + g.db.add(ma) elif reason.startswith('/h/') and (v.admin_level >= 2 or v.id == post.author_id): sub_from = post.sub