aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/trait.py
diff options
context:
space:
mode:
authorMunyoki Kilyungi2022-09-03 22:42:20 +0300
committerBonfaceKilz2022-09-08 14:26:19 +0300
commitff02437032b7a26cd11100c4981201307765f66a (patch)
treee0b1dd3a025746eaaf6b25aaa71f14be678a94cd /wqflask/base/trait.py
parent72336a5876ddffba15aede5e02546e7dbf7a19f5 (diff)
downloadgenenetwork2-ff02437032b7a26cd11100c4981201307765f66a.tar.gz
Replace assertion with Value Error for non-existent dataset
* wqflask/base/trait.py (retrieve_trait_info): Wrap error message in ValueError.
Diffstat (limited to 'wqflask/base/trait.py')
-rw-r--r--wqflask/base/trait.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 57cc8a9b..c275083d 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -378,7 +378,8 @@ def jsonable(trait, dataset=None):
def retrieve_trait_info(trait, dataset, get_qtl_info=False):
- assert dataset, "Dataset doesn't exist"
+ if not dataset:
+ raise ValueError("Dataset doesn't exist")
resource_id = get_resource_id(dataset, trait.name)
if dataset.type == 'Publish':