Skip to content
Snippets Groups Projects
Commit 0d438c26 authored by Troubardours's avatar Troubardours
Browse files

fixes for cases where strain and sex attributes are empty

parent 51e1c0e6
No related branches found
No related tags found
1 merge request!28WIP: Fix empty strain sex
......@@ -62,6 +62,11 @@ class DeploySpeciesStack(species_data.SpeciesData):
logging.critical("Cannot access %s" % self.genus_species)
sys.exit(exc)
print(self.strain)
print(self.sex)
print(self.strain_sex)
print(self.full_name)
# Copy the custom banner to the species dir (banner used in tripal pages)
# If the path specified is invalid (because it's empty or is still the default demo one),
# use the default banner instead
......
......@@ -102,8 +102,14 @@ class SpeciesData:
self.genus_lowercase = self.genus.lower()
self.species_lowercase = self.species.lower()
self.strain_lowercase = self.strain.lower()
self.sex_lowercase = self.sex.lower()
try:
self.strain_lowercase = self.strain.lower()
except AttributeError as exc:
self.strain_lowercase = None
try:
self.sex_lowercase = self.sex.lower()
except AttributeError as exc:
self.sex_lowercase = None
self.genus_uppercase = self.genus[0].upper() + self.genus_lowercase[1:]
self.genus_species = "{0}_{1}".format(self.genus_lowercase, self.species_lowercase)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment