forked from MarseyWorld/MarseyWorld
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.master
parent
643ea8b429
commit
0e70879598
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue