diff options
author | zsloan | 2019-02-15 10:47:59 -0600 |
---|---|---|
committer | zsloan | 2019-02-15 10:47:59 -0600 |
commit | 57d6d5c279a0386cd6e6ebd1c075c97487a3ee13 (patch) | |
tree | c8aacc21f97cd46bd99bdbad347c8833148cb60d /wqflask | |
parent | 8d4b07d6c8470eb9f0b02dd8c7903fca267e2e25 (diff) | |
download | genenetwork2-57d6d5c279a0386cd6e6ebd1c075c97487a3ee13.tar.gz |
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"
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/base/webqtlCaseData.py | 2 | ||||
-rw-r--r-- | 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 '<input type="text" data-value="' + data.num_cases + '" data-qnorm="' + js_data['qnorm_vals'][0][parseInt(data.this_id)] + '" name="value:' + data.name + '" style="text-align: right;" class="trait_value_input edit_sample_num_cases" value="' + data.num_cases + '" size=4 maxlength=4>' + if (data.num_cases == null) { + return '<input type="text" data-value="x" data-qnorm="x" name="value:' + data.name + '" style="text-align: right;" class="trait_value_input edit_sample_num_cases" value="x" size=4 maxlength=4>' + } else { + return '<input type="text" data-value="' + data.num_cases + '" data-qnorm="x" name="value:' + data.name + '" style="text-align: right;" class="trait_value_input edit_sample_num_cases" value="' + data.num_cases + '" size=4 maxlength=4>' + } } }{% 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 '<input type="text" data-value="' + data.num_cases + '" data-qnorm="' + js_data['qnorm_vals'][1][parseInt(data.this_id)] + '" name="value:' + data.name + '" style="text-align: right;" class="trait_value_input edit_sample_num_cases" value="' + data.num_cases + '" size=4 maxlength=4>' + if (data.num_cases == null) { + return '<input type="text" data-value="x" data-qnorm="x" name="value:' + data.name + '" style="text-align: right;" class="trait_value_input edit_sample_num_cases" value="x" size=4 maxlength=4>' + } else { + return '<input type="text" data-value="' + data.num_cases + '" data-qnorm="x" name="value:' + data.name + '" style="text-align: right;" class="trait_value_input edit_sample_num_cases" value="' + data.num_cases + '" size=4 maxlength=4>' + } } }{% endif %}{% if sample_groups[1].attributes|length > 0 %}{% for attribute in sample_groups[1].attributes|sort() %}, { |