aboutsummaryrefslogtreecommitdiff
path: root/gn2
diff options
context:
space:
mode:
authorJohn Nduli2024-09-17 16:35:19 +0300
committerBonfaceKilz2024-09-17 17:18:19 +0300
commit911584f05c723e51a3691069beb260138afcc5b2 (patch)
tree5d2a5bc8e7a62a33bb367b0d3b93c984982df70f /gn2
parentd58288c315481c766bce203493bbcf3fb038b0e2 (diff)
downloadgenenetwork2-911584f05c723e51a3691069beb260138afcc5b2.tar.gz
refactor: improve do_ai_search
Diffstat (limited to 'gn2')
-rw-r--r--gn2/wqflask/views.py4
1 files changed, 1 insertions, 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":