From fd4fde868727a2779a11c38ef7cda300d4288030 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 17 Dec 2025 12:29:50 -0600 Subject: Index page/Home page: Remove unnecessary check. Since `sui_template(...)` function loads the appropriate template depending on flags, there is no point in checking it again here. --- uploader/base_routes.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'uploader/base_routes.py') diff --git a/uploader/base_routes.py b/uploader/base_routes.py index cc2a270..e9f1165 100644 --- a/uploader/base_routes.py +++ b/uploader/base_routes.py @@ -36,16 +36,11 @@ def favicon(): def index(): """Load the landing page""" streamlined_ui = request.args.get("streamlined_ui") - if not bool(streamlined_ui):# TODO: Remove this section - return render_template( - "index.html" if user_logged_in() else "login.html", - gn2server_intro=urljoin(app.config["GN2_SERVER_URL"], "/intro")) - with database_connection(app.config["SQL_URI"]) as conn: print("We found a species ID. Processing...") if not bool(request.args.get("species_id")): return render_template( - sui_template("index.html"), + sui_template("index.html" if user_logged_in() else "login.html"), gn2server_intro=urljoin(app.config["GN2_SERVER_URL"], "/intro"), species=all_species(conn), streamlined_ui=streamlined_ui) -- cgit 1.4.1