diff options
Diffstat (limited to 'wqflask/base/data_set/datasetgroup.py')
-rw-r--r-- | wqflask/base/data_set/datasetgroup.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/wqflask/base/data_set/datasetgroup.py b/wqflask/base/data_set/datasetgroup.py index 72577f38..95dc976f 100644 --- a/wqflask/base/data_set/datasetgroup.py +++ b/wqflask/base/data_set/datasetgroup.py @@ -15,6 +15,7 @@ from utility.tools import ( locate, USE_REDIS, flat_files, + get_setting, flat_file_exists, locate_ignore_error) @@ -29,7 +30,7 @@ class DatasetGroup: def __init__(self, dataset, name=None): """This sets self.group and self.group_id""" - with database_connection() as conn, conn.cursor() as cursor: + with database_connection(get_setting("SQL_URI")) as conn, conn.cursor() as cursor: if not name: cursor.execute(dataset.query_for_group, (dataset.name,)) @@ -64,7 +65,7 @@ class DatasetGroup: def get_mapping_methods(self): mapping_id = () - 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 MappingMethodId FROM " "InbredSet WHERE Name= %s", |