diff options
author | zsloan | 2023-07-10 14:59:48 +0000 |
---|---|---|
committer | zsloan | 2023-07-10 15:02:02 +0000 |
commit | 5815f22c20f41a36e44eeef014c19f877d339ece (patch) | |
tree | c2c0ce0c469a35074ccfc7d65830a10b1107f6ab | |
parent | 5ae4ec152a50b0811985b87848eaed2a7594fbeb (diff) | |
download | genenetwork2-5815f22c20f41a36e44eeef014c19f877d339ece.tar.gz |
Fix bug when adding PCA traits to a collection
The bug was caused by PCA traits not having description_display
-rw-r--r-- | wqflask/wqflask/collect.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/wqflask/wqflask/collect.py b/wqflask/wqflask/collect.py index 8f19b374..c80c82cd 100644 --- a/wqflask/wqflask/collect.py +++ b/wqflask/wqflask/collect.py @@ -267,7 +267,10 @@ def trait_info_str(trait): def __trait_desc(trt): if trait.dataset.type == "Geno": return f"Marker: {trt.name}" - return trt.description_display or "N/A" + if hasattr(trt, "description_display"): + return trt.description_display + else: + return "N/A" def __symbol(trt): return (trt.symbol or trt.abbreviation or "N/A")[:20] |