Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The 404 page crashes when the user is logged in: File "/home/zorun/code/ihatemoney/ihatemoney/templates/404.html", line 1, in top-level template code {% extends "layout.html" %} File "/home/zorun/code/ihatemoney/ihatemoney/templates/layout.html", line 124, in top-level template code {{ g.logout_form.hidden_tag() }} File "/home/zorun/venv/py3-ihatemoney/lib/python3.9/site-packages/jinja2/environment.py", line 474, in getattr return getattr(obj, attribute) jinja2.exceptions.UndefinedError: 'flask.ctx._AppCtxGlobals object' has no attribute 'logout_form' This is because the logout form is defined by a URL processor, and this does not seem to apply for all pages. To solve this, simply skip the logout form if it's not defined.
- Loading branch information