From dfb00fafb967609afe8cfce6a0139cff42daefed Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 6 Feb 2024 23:44:59 +0200 Subject: [PATCH] simplify position code in reporting.py --- files/routes/reporting.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/files/routes/reporting.py b/files/routes/reporting.py index eacc20609..e825c5fba 100644 --- a/files/routes/reporting.py +++ b/files/routes/reporting.py @@ -227,6 +227,7 @@ def move_post(post, v, reason): _note=f'{hole_from_str} → {hole_to_str}', ) g.db.add(ma) + position = 'a site admin' else: ma = HoleAction( hole=hole_from, @@ -236,9 +237,7 @@ def move_post(post, v, reason): _note=f'{hole_from_str} → {hole_to_str}', ) g.db.add(ma) - - if v.admin_level >= PERMS['POST_COMMENT_MODERATION']: position = 'a site admin' - else: position = f'a /h/{hole_from} mod' + position = f'a /h/{hole_from} mod' if hole_from == None: hole_from_in_notif = 'the main feed'