From 0e70879598964105f15809fc69b61e7b392adc23 Mon Sep 17 00:00:00 2001 From: TLSM Date: Tue, 30 Aug 2022 19:20:27 -0400 Subject: [PATCH] Fix /h//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. --- files/routes/posts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index e814bee4a..168f8ff63 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -87,7 +87,7 @@ def publish(pid, v): @app.get("/h//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)