aboutsummaryrefslogtreecommitdiff
path: root/gn3
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-07-12 13:50:34 +0300
committerFrederick Muriuki Muriithi2023-07-12 13:50:34 +0300
commitf920f9ad6d74648a0f572f3e937cfe1ea6578b3f (patch)
treea942f90787227a2aff50a0acdba9ccf030fdd09a /gn3
parentd5bb32d0c09617a47732064a95c33bf53a2e7c13 (diff)
downloadgenenetwork3-f920f9ad6d74648a0f572f3e937cfe1ea6578b3f.tar.gz
Bug: Retrieve configs from app, not environment
Retrieve the configuration values from the application object, not from the environment. We are assured of having the configuration values set in the application - we do not have that assurance for the environment.
Diffstat (limited to 'gn3')
-rw-r--r--gn3/db/datasets.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gn3/db/datasets.py b/gn3/db/datasets.py
index 8839f2e..28fe0fe 100644
--- a/gn3/db/datasets.py
+++ b/gn3/db/datasets.py
@@ -4,6 +4,8 @@ This module contains functions relating to specific trait dataset manipulation
import os
from typing import Any
+from flask import current_app as app
+
def retrieve_sample_list(group: str):
"""
Get the sample list for a group (a category that datasets belong to)
@@ -14,7 +16,7 @@ def retrieve_sample_list(group: str):
samplelist = []
genofile_path = (
- f'{os.environ.get("GENENETWORK_FILES", "/home/gn2/production/genotype_files/")}'
+ f'{app.config.get("GENENETWORK_FILES", "/home/gn2/production/genotype_files/")}'
f'/genotype/{group}.geno'
)
if os.path.isfile(genofile_path):