aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/trait.py
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/base/trait.py')
-rw-r--r--wqflask/base/trait.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 9566c192..32032ba7 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"
@@ -364,7 +363,7 @@ class GeneralTrait(object):
FROM
Homologene, Species, InbredSet
WHERE
- Homologene.GeneId =%s AND
+ Homologene.GeneId ='%s' AND
InbredSet.Name = '%s' AND
InbredSet.SpeciesId = Species.Id AND
Species.TaxonomyId = Homologene.TaxonomyId
@@ -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()