From 911584f05c723e51a3691069beb260138afcc5b2 Mon Sep 17 00:00:00 2001 From: John Nduli Date: Tue, 17 Sep 2024 16:35:19 +0300 Subject: refactor: improve do_ai_search --- gn2/wqflask/views.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gn2/wqflask/views.py b/gn2/wqflask/views.py index 29df7596..d9c35115 100644 --- a/gn2/wqflask/views.py +++ b/gn2/wqflask/views.py @@ -248,9 +248,7 @@ def gsearchact(): search_type = request.args["type"] is_user_logged_in = session_info().get("user", {}).get("logged_in", False) - do_ai_search = False - if current_app.config.get("AI_SEARCH_ENABLED") and is_user_logged_in: - do_ai_search = True + do_ai_search = current_app.config.get("AI_SEARCH_ENABLED") and is_user_logged_in if search_type == "gene": return render_template("gsearch_gene.html", **result, do_ai_search=do_ai_search, result=result) elif search_type == "phenotype": -- cgit v1.2.3