aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-07-05 10:07:42 +0300
committerzsloan2023-07-05 11:51:55 -0500
commit93939248fdaaa89a9e3b74027addd8ea64d1a8e9 (patch)
tree14c0508af4389adbe28bf3bad7424bb2895753f4
parent9e1902f0bdff015e504134e0572f9a546966d7d5 (diff)
downloadgenenetwork2-93939248fdaaa89a9e3b74027addd8ea64d1a8e9.tar.gz
Get setting from config files on envvars
The main code should only ever get its configs from the application configurations, and not directly from the envvars. This helps with maintenance by ensuring that the application configurations are done in one place, and can be traced for debugging purposes.
-rw-r--r--wqflask/wqflask/metadata_edits.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/wqflask/wqflask/metadata_edits.py b/wqflask/wqflask/metadata_edits.py
index 59cc3083..5b03f3ed 100644
--- a/wqflask/wqflask/metadata_edits.py
+++ b/wqflask/wqflask/metadata_edits.py
@@ -148,7 +148,7 @@ def display_phenotype_metadata(dataset_id: str, name: str):
dataset_id=dataset_id,
name=name,
resource_id=request.args.get("resource-id"),
- version=os.environ.get("GN_VERSION"),
+ version=get_setting("GN_VERSION"),
dataset_name=request.args["dataset_name"])
@@ -165,7 +165,7 @@ def display_probeset_metadata(name: str):
probeset=_d.get("probeset"),
name=name,
resource_id=request.args.get("resource-id"),
- version=os.environ.get("GN_VERSION"),
+ version=get_setting("GN_VERSION"),
dataset_name=request.args["dataset_name"]
)
@@ -620,7 +620,7 @@ def show_history(dataset_id: str = "", name: str = ""):
return render_template(
"edit_history.html",
diff=diff_data_,
- version=os.environ.get("GN_VERSION"),
+ version=get_setting("GN_VERSION"),
)