aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/trait.py
diff options
context:
space:
mode:
authorPjotr Prins2016-09-09 08:35:18 +0200
committerPjotr Prins2016-09-09 08:35:18 +0200
commit8744bf9c11481c910d029c3e6b1ae1adde27c271 (patch)
treeedfab9ad67d190ef22fe2c876583a9f2380d5f86 /wqflask/base/trait.py
parent7cc37bf2efba6873fccd0f1756c89d25400afd47 (diff)
parentccf8474f5f94891782891bd3677e6ddf5d08d24a (diff)
downloadgenenetwork2-8744bf9c11481c910d029c3e6b1ae1adde27c271.tar.gz
Merge branch 'master' of github.com:genenetwork/genenetwork2
Diffstat (limited to 'wqflask/base/trait.py')
-rw-r--r--wqflask/base/trait.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 9566c192..900e050c 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -116,7 +116,6 @@ class GeneralTrait(object):
return stringy
-
def display_name(self):
stringy = ""
if self.dataset and self.name:
@@ -323,7 +322,7 @@ class GeneralTrait(object):
#phenotype traits, then display the pre-publication description instead
#of the post-publication description
if self.confidential:
- self.description_display = ""
+ self.description_display = self.pre_publication_description
#if not webqtlUtil.hasAccessToConfidentialPhenotypeTrait(
# privilege=self.dataset.privilege,
@@ -331,11 +330,11 @@ class GeneralTrait(object):
# authorized_users=self.authorized_users):
#
# description = self.pre_publication_description
-
- if description:
- self.description_display = description.strip()
else:
- self.description_display = ""
+ if description:
+ self.description_display = description.strip()
+ else:
+ self.description_display = ""
if not self.year.isdigit():
self.pubmed_text = "N/A"
@@ -613,7 +612,10 @@ class GeneralTrait(object):
if self.probe_target_description:
formatted += "; " + self.probe_target_description
elif self.dataset.type == 'Publish':
- formatted = self.post_publication_description
+ if self.confidential:
+ formatted = self.pre_publication_description
+ else:
+ formatted = self.post_publication_description
else:
formatted = "Not available"
return formatted.capitalize()