From e0d2e89c55b906648df0c5a2a33b535faa5fb0fc Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Fri, 17 Nov 2023 00:27:38 +1100 Subject: [PATCH] fix: Keep link formatting on error page --- main.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index d785d7c..99149b0 100644 --- a/main.py +++ b/main.py @@ -40,11 +40,12 @@ def error(message): avatar=account.get_avatar(domain) host = request.host links = db.get_users_links(domain) + link_count = len(links) if links == False: - links = [] - - - return render_template('dash.html',domain=domain,avatar=avatar,host=host,links=links,link_count=len(links),message=message) + links = "

No links created yet

" + else: + links = render.links(links,host) + return render_template('dash.html',domain=domain,avatar=avatar,host=host,links=links,link_count=link_count,message=message) @app.route('/') def index():