master
Aevann1 2022-05-26 21:19:33 +02:00
parent 1e8c00f6fe
commit f7dea74b37
1 changed files with 4 additions and 1 deletions

View File

@ -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",