diff options
Diffstat (limited to 'wqflask/utility')
-rw-r--r-- | wqflask/utility/authentication_tools.py | 4 | ||||
-rw-r--r-- | wqflask/utility/helper_functions.py | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/wqflask/utility/authentication_tools.py b/wqflask/utility/authentication_tools.py index 7d80b3fb..5d00d600 100644 --- a/wqflask/utility/authentication_tools.py +++ b/wqflask/utility/authentication_tools.py @@ -9,7 +9,7 @@ from utility.redis_tools import (get_redis_conn, get_resource_info, get_resource_id, add_resource) -from utility.tools import GN_PROXY_URL +from utility.tools import get_setting, GN_PROXY_URL Redis = get_redis_conn() @@ -82,7 +82,7 @@ def add_new_resource(dataset, trait_id=None): def get_group_code(dataset): - with database_connection() as conn, conn.cursor() as cursor: + with database_connection(get_setting("SQL_URI")) as conn, conn.cursor() as cursor: cursor.execute( "SELECT InbredSetCode FROM InbredSet WHERE Name=%s", (dataset.group.name,) diff --git a/wqflask/utility/helper_functions.py b/wqflask/utility/helper_functions.py index 0c0794dc..8b20bd74 100644 --- a/wqflask/utility/helper_functions.py +++ b/wqflask/utility/helper_functions.py @@ -3,6 +3,7 @@ from base.trait import create_trait from base.species import TheSpecies from utility import hmac +from utility.tools import get_setting from wqflask.database import database_connection @@ -51,7 +52,7 @@ def get_species_groups(): """Group each species into a group""" _menu = {} species, group_name = None, None - with database_connection() as conn, conn.cursor() as cursor: + with database_connection(get_setting("SQL_URI")) as conn, conn.cursor() as cursor: cursor.execute( "SELECT s.MenuName, i.InbredSetName FROM InbredSet i " "INNER JOIN Species s ON s.SpeciesId = i.SpeciesId " |