aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2023-03-15 00:50:51 +0000
committerzsloan2023-03-15 00:59:01 +0000
commit328ff82e449f88089025576e7d703a704cb90276 (patch)
treeab9213542554c4fb38a30f699bf7f41d997f1a13 /wqflask
parent1092df2d1461cf0d3dbbcb28a984a9caeae27082 (diff)
downloadgenenetwork2-328ff82e449f88089025576e7d703a704cb90276.tar.gz
Fix bug caused by RRIDs parseable as ints
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/show_trait/SampleList.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/wqflask/wqflask/show_trait/SampleList.py b/wqflask/wqflask/show_trait/SampleList.py
index e7fbc19b..44b89671 100644
--- a/wqflask/wqflask/show_trait/SampleList.py
+++ b/wqflask/wqflask/show_trait/SampleList.py
@@ -71,20 +71,19 @@ class SampleList:
# Add a url so RRID case attributes can be displayed as links
if '36' in sample.extra_attributes:
+ rrid_string = str(sample.extra_attributes['36'])
if self.dataset.group.species == "mouse":
- if len(sample.extra_attributes['36'].split(":")) > 1:
- the_rrid = sample.extra_attributes['36'].split(":")[
- 1]
+ if len(rrid_string.split(":")) > 1:
+ the_rrid = rrid_string.split(":")[1]
sample.extra_attributes['36'] = [
- sample.extra_attributes['36']]
+ rrid_string]
sample.extra_attributes['36'].append(
webqtlConfig.RRID_MOUSE_URL % the_rrid)
elif self.dataset.group.species == "rat":
- if len(str(sample.extra_attributes['36'])):
- the_rrid = sample.extra_attributes['36'].split("_")[
- 1]
+ if len(rrid_string):
+ the_rrid = rrid_string.split("_")[1]
sample.extra_attributes['36'] = [
- sample.extra_attributes['36']]
+ rrid_string]
sample.extra_attributes['36'].append(
webqtlConfig.RRID_RAT_URL % the_rrid)