Fix /h/<sub>/submit header icon.

sub.marsey_url was returning false because the submit.html template,
which then includes header.html, was passed an SQLAlchemy Row instance,
not a files.classes.sub.Sub instance. This worked alright because both
the header and the submit page only accessed the name field; however,
accessing the marsey_url property (rather than the marseyurl column
field) failed because of it.
remotes/1693045480750635534/spooky-22
Snakes 2022-08-30 19:20:27 -04:00
parent 643ea8b429
commit 0e70879598
Signed by: Snakes
GPG Key ID: E745A82778055C7E
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ def publish(pid, v):
@app.get("/h/<sub>/submit")
@auth_required
def submit_get(v, sub=None):
if sub: sub = g.db.query(Sub.name).filter_by(name=sub.strip().lower()).one_or_none()
if sub: sub = g.db.query(Sub).filter_by(name=sub.strip().lower()).one_or_none()
if request.path.startswith('/h/') and not sub: abort(404)