aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBonfaceKilz2020-08-27 03:22:06 +0300
committerBonfaceKilz2020-08-27 03:22:06 +0300
commit1e030b2543c22a8148f39657b5921724d9512d40 (patch)
tree81e5dec40e0953f7ba527896b68f7160bfa6578b
parente102c7c0a7d1ad3c305ed8db0d19fa12cfa5cb38 (diff)
downloadgenenetwork2-1e030b2543c22a8148f39657b5921724d9512d40.tar.gz
Remove python2 string processing to utf-8
* wqflask/base/trait.py: Remove python2 codecs.BOM_UTF8 methods. * wqflask/wqflask/search_results.py: Remove utf-8 decode method on string.
-rw-r--r--wqflask/base/trait.py4
-rw-r--r--wqflask/wqflask/search_results.py2
2 files changed, 1 insertions, 5 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index e3507ae1..6950cf11 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -488,10 +488,6 @@ def retrieve_trait_info(trait, dataset, get_qtl_info=False):
else:
trait.description_display = ""
- trait.abbreviation = str(str(trait.abbreviation).strip(codecs.BOM_UTF8), 'utf-8', errors="replace")
- trait.description_display = str(str(trait.description_display).strip(codecs.BOM_UTF8), 'utf-8', errors="replace")
- trait.authors = str(str(trait.authors).strip(codecs.BOM_UTF8), 'utf-8', errors="replace")
-
if not trait.year.isdigit():
trait.pubmed_text = "N/A"
else:
diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py
index f6c677a8..0de14f15 100644
--- a/wqflask/wqflask/search_results.py
+++ b/wqflask/wqflask/search_results.py
@@ -115,7 +115,7 @@ views.py).
trait_dict['hmac'] = hmac.data_hmac('{}:{}'.format(this_trait.name, this_trait.dataset.name))
if this_trait.dataset.type == "ProbeSet":
trait_dict['symbol'] = this_trait.symbol
- trait_dict['description'] = this_trait.description_display.decode('utf-8', 'replace')
+ trait_dict['description'] = this_trait.description_display
trait_dict['location'] = this_trait.location_repr
trait_dict['mean'] = "N/A"
trait_dict['additive'] = "N/A"