From 083be80dd57f4a4704c24af221fc6efbe9eee64e Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 15 Nov 2024 19:39:23 +0200 Subject: [PATCH] consistency --- files/routes/users.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/routes/users.py b/files/routes/users.py index 02dd756c9..a44fbcd95 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -210,7 +210,8 @@ def transfer_currency(v, username, currency_name, apply_tax): def upvoters_downvoters(v, username, username2, cls, vote_cls, vote_dir, template, standalone): u = get_user(username, v=v) - if not u.is_visible_to(v, 0, "posts"): stop(403) + kind = "posts" if cls == Post else "comments" + if not u.is_visible_to(v, 0, kind): stop(403) id = u.id uid = get_user(username2, attributes=[User.id]).id