diff options
author | Munyoki Kilyungi | 2022-09-03 22:42:20 +0300 |
---|---|---|
committer | BonfaceKilz | 2022-09-08 14:26:19 +0300 |
commit | ff02437032b7a26cd11100c4981201307765f66a (patch) | |
tree | e0b1dd3a025746eaaf6b25aaa71f14be678a94cd /wqflask/base | |
parent | 72336a5876ddffba15aede5e02546e7dbf7a19f5 (diff) | |
download | genenetwork2-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')
-rw-r--r-- | wqflask/base/trait.py | 3 |
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': |