From f7dea74b3738f1acc97d92cc600ccabb1c582420 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 26 May 2022 21:19:33 +0200 Subject: [PATCH] fds --- files/routes/reporting.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/files/routes/reporting.py b/files/routes/reporting.py index eb2ae792d..4b4fe600c 100644 --- a/files/routes/reporting.py +++ b/files/routes/reporting.py @@ -40,7 +40,10 @@ def api_flag_post(pid, v): ) g.db.add(ma) elif reason.startswith('/h/') and v.admin_level > 1: - post.sub = reason[3:] + sub = reason[3:].strip().lower() + sub = g.db.query(Sub).filter_by(name=sub).one_or_none() + if not sub: abort(404) + post.sub = sub.name g.db.add(post) ma=ModAction( kind="move_hole",