about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi <fredmanglis@gmail.com>2026-09-29 11:33:58 -0500
committerFrederick Muriuki Muriithi <fredmanglis@gmail.com>2026-09-29 11:33:58 -0500
commit6e37dde5dadcc1609db81c212018c76d0891731c (patch)
tree5cfc3c4722f9601abaf49d12cabf2330fb42be97
parentae212d4acf1e80d117bc9fb7692605a19721a41b (diff)
downloadgn-auth-6e37dde5dadcc1609db81c212018c76d0891731c.tar.gz
Pass the 'AUTH_DB' config to the SQLite function(s).
The `with_db_connection(...)` function in this module is the SQLite
version, not the MariaDB version, therefore we need to pass the file
to the SQLite database file and not the MariaDB connection string.
-rw-r--r--gn_auth/auth/authorisation/data/views.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/gn_auth/auth/authorisation/data/views.py b/gn_auth/auth/authorisation/data/views.py
index 0ffc08e..512e5d8 100644
--- a/gn_auth/auth/authorisation/data/views.py
+++ b/gn_auth/auth/authorisation/data/views.py
@@ -206,7 +206,7 @@ def __search_mrna__():
             ungrouped_mrna_data, gn3conn=gn3conn, search_query=query,
             selected=__request_key_list__("selected"),
             limit=limit, offset=offset)
-        return jsonify(with_db_connection(app.config["SQL_URI"], __ungrouped__))
+        return jsonify(with_db_connection(app.config["AUTH_DB"], __ungrouped__))
 
 def __request_key__(key: str, default: Any = ""):
     if bool(request_json()):
@@ -231,7 +231,7 @@ def __search_genotypes__():
             ungrouped_genotype_data, gn3conn=gn3conn, search_query=query,
             selected=__request_key_list__("selected"),
             limit=limit, offset=offset)
-        return jsonify(with_db_connection(app.config["SQL_URI"], __ungrouped__))
+        return jsonify(with_db_connection(app.config["AUTH_DB"], __ungrouped__))
 
 def __search_phenotypes__():
     # launch the external process to search for phenotypes
@@ -306,7 +306,7 @@ def link_genotypes() -> Response:
         return link_genotype_data(conn, group_by_id(conn, group_id), datasets)
 
     return jsonify(with_db_connection(
-        app.config["SQL_URI"],
+        app.config["AUTH_DB"],
         partial(__link__, **__values__(request_json()))))
 
 @data.route("/link/mrna", methods=["POST"])
@@ -332,7 +332,7 @@ def link_mrna() -> Response:
         return link_mrna_data(conn, group_by_id(conn, group_id), datasets)
 
     return jsonify(with_db_connection(
-        app.config["SQL_URI"],
+        app.config["AUTH_DB"],
         partial(__link__, **__values__(request_json()))))
 
 @data.route("/link/phenotype", methods=["POST"])
@@ -375,5 +375,5 @@ def link_phenotype() -> Response:
                                        pheno_traits_from_db(gn3conn, traits))
 
         return jsonify(with_db_connection(
-            app.config["SQL_URI"],
+            app.config["AUTH_DB"],
             partial(__link__, **__values__(request_json()))))