From ff02437032b7a26cd11100c4981201307765f66a Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Sat, 3 Sep 2022 22:42:20 +0300 Subject: Replace assertion with Value Error for non-existent dataset * wqflask/base/trait.py (retrieve_trait_info): Wrap error message in ValueError. --- wqflask/base/trait.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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': -- cgit v1.2.3