diff options
author | zsloan | 2022-04-21 19:04:42 +0000 |
---|---|---|
committer | zsloan | 2022-04-21 19:04:42 +0000 |
commit | 36ce17239c002749e59b65d13402bd31375dfaf1 (patch) | |
tree | 37cf05202b305ea44c5556f8695f246d7d9c25bc /wqflask | |
parent | d9bd1530aa2f46c5f54ea1ec80e56ad2c6ad6efb (diff) | |
download | genenetwork2-36ce17239c002749e59b65d13402bd31375dfaf1.tar.gz |
Fix error caused by traits without LRS values on collection page
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/collect.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/wqflask/wqflask/collect.py b/wqflask/wqflask/collect.py index de61323a..ce3a5e3f 100644 --- a/wqflask/wqflask/collect.py +++ b/wqflask/wqflask/collect.py @@ -203,9 +203,12 @@ def trait_info_str(trait): if trait.dataset.type == "Geno": return 0 else: - return ( - f"{float(trait.LRS_score_repr):0.3f}" if float(trait.LRS_score_repr) > 0 - else f"{trait.LRS_score_repr}") + if trait.LRS_score_repr != "N/A": + return ( + f"{float(trait.LRS_score_repr):0.3f}" if float(trait.LRS_score_repr) > 0 + else f"{trait.LRS_score_repr}") + else: + return "N/A" def __lrs_location(trt): if hasattr(trt, "LRS_location_repr"): |