From b0e62578cfbdb8ca941e94d3ccde276b49ce46fe Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 6 Mar 2022 21:13:11 +0200 Subject: [PATCH] fixed kicking --- files/routes/subs.py | 2 +- files/templates/post_actions.html | 10 ++++++---- files/templates/post_actions_mobile.html | 8 +++++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/files/routes/subs.py b/files/routes/subs.py index b98ffe08b..bc5dfdfb5 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -365,7 +365,7 @@ def kick(v, pid): if not post.sub: abort(403) if not v.mods(post.sub): abort(403) - post.sub = 'general' + post.sub = None g.db.add(post) g.db.commit() diff --git a/files/templates/post_actions.html b/files/templates/post_actions.html index e33b95bb9..c0b96433b 100644 --- a/files/templates/post_actions.html +++ b/files/templates/post_actions.html @@ -78,11 +78,13 @@ {% endif %} - {% if p.sub and v.mods(p.sub) and not p.author.mods(p.sub) %} + {% if p.sub and v.mods(p.sub) %} Remove - - Exile user - Unexile user + + {% if not p.author.mods(p.sub) %} + Exile user + Unexile user + {% endif %} {% endif %} diff --git a/files/templates/post_actions_mobile.html b/files/templates/post_actions_mobile.html index cd7bdecf0..a660b19c8 100644 --- a/files/templates/post_actions_mobile.html +++ b/files/templates/post_actions_mobile.html @@ -50,9 +50,11 @@ {% endif %} {% endif %} -{% if p.sub and v.mods(p.sub) and not p.author.mods(p.sub) %} +{% if p.sub and v.mods(p.sub) %} - - + {% if not p.author.mods(p.sub) %} + + + {% endif %} {% endif %}