From 36ce17239c002749e59b65d13402bd31375dfaf1 Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 21 Apr 2022 19:04:42 +0000 Subject: Fix error caused by traits without LRS values on collection page --- wqflask/wqflask/collect.py | 9 ++++++--- 1 file 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"): -- cgit v1.2.3