don't show jannies flairing in the modlog

master
Aevann1 2022-08-20 22:14:20 +02:00
parent 76be409dbd
commit b71d55cfb9
1 changed files with 8 additions and 7 deletions

View File

@ -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)): if reason.startswith('!') and (v.admin_level > 1 or post.sub and v.mods(post.sub)):
post.flair = reason[1:] post.flair = reason[1:]
g.db.add(post) g.db.add(post)
ma=ModAction( if v.admin_level > 1:
kind="flair_post", ma=ModAction(
user_id=v.id, kind="flair_post",
target_submission_id=post.id, user_id=v.id,
_note=f'"{post.flair}"' target_submission_id=post.id,
) _note=f'"{post.flair}"'
g.db.add(ma) )
g.db.add(ma)
elif reason.startswith('/h/') and (v.admin_level >= 2 or v.id == post.author_id): elif reason.startswith('/h/') and (v.admin_level >= 2 or v.id == post.author_id):
sub_from = post.sub sub_from = post.sub