From 57d6d5c279a0386cd6e6ebd1c075c97487a3ee13 Mon Sep 17 00:00:00 2001
From: zsloan
Date: Fri, 15 Feb 2019 10:47:59 -0600
Subject: Fixed error caused by change to N values in database (now takes
strings instead of integers)
Fixed error that caused N to show up as "null" in the trait sample table instead of "x"
---
wqflask/base/webqtlCaseData.py | 2 +-
wqflask/wqflask/templates/show_trait.html | 12 ++++++++++--
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/wqflask/base/webqtlCaseData.py b/wqflask/base/webqtlCaseData.py
index aa34024c..d8487f01 100644
--- a/wqflask/base/webqtlCaseData.py
+++ b/wqflask/base/webqtlCaseData.py
@@ -81,6 +81,6 @@ class webqtlCaseData(object):
@property
def display_num_cases(self):
if self.num_cases != None:
- return "%d" % self.num_cases
+ return "%s" % self.num_cases
else:
return "x"
diff --git a/wqflask/wqflask/templates/show_trait.html b/wqflask/wqflask/templates/show_trait.html
index fc5f5e7b..def40f5d 100644
--- a/wqflask/wqflask/templates/show_trait.html
+++ b/wqflask/wqflask/templates/show_trait.html
@@ -271,7 +271,11 @@
'data': null,
'orderDataType': "cust-txt",
'render': function(data, type, row, meta) {
- return ''
+ if (data.num_cases == null) {
+ return ''
+ } else {
+ return ''
+ }
}
}{% endif %}{% if sample_groups[0].attributes|length > 0 %}{% for attribute in sample_groups[0].attributes|sort() %},
{
@@ -392,7 +396,11 @@
'data': null,
'orderDataType': "cust-txt",
'render': function(data, type, row, meta) {
- return ''
+ if (data.num_cases == null) {
+ return ''
+ } else {
+ return ''
+ }
}
}{% endif %}{% if sample_groups[1].attributes|length > 0 %}{% for attribute in sample_groups[1].attributes|sort() %},
{
--
cgit v1.2.3