master
Aevann1 2022-02-22 12:59:33 +02:00
parent d3cbd7cf88
commit f577b460cc
1 changed files with 2 additions and 1 deletions

View File

@ -862,7 +862,8 @@ def submit_post(v, sub=None):
return render_template("submit.html", SUBS=SUBS, v=v, error=error, title=title, url=url, body=body, ghost=submit_ghost(v,g.db)), 400
sub = request.values.get("sub").replace('/s/','').replace('s/','')
sub = request.values.get("sub")
if sub: sub = sub.replace('/s/','').replace('s/','')
if sub and sub != 'none':
sub = g.db.query(Sub.name).filter_by(name=sub.strip().lower()).one_or_none()