From 12bea33e46485193531656d29286ad05fed5d312 Mon Sep 17 00:00:00 2001
From: Troubardours <arthur.lebars@gmail.com>
Date: Wed, 2 Jun 2021 13:36:30 +0200
Subject: [PATCH] fixes for cases where strain and sex attributes are empty

---
 species_data.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/species_data.py b/species_data.py
index 37cb0de..b019c3d 100644
--- a/species_data.py
+++ b/species_data.py
@@ -118,9 +118,10 @@ class SpeciesData:
         self.full_name = ' '.join(utilities.filter_empty_not_empty_items([self.genus_uppercase, self.species_lowercase, self.strain, self.sex])["not_empty"])
         self.full_name_lowercase = self.full_name.lower()
 
-        self.species_folder_name = "_".join(utilities.filter_empty_not_empty_items(
-            [self.genus_lowercase, self.species_lowercase, self.strain.lower(),
-             self.sex.lower()])["not_empty"])
+        self.species_folder_name = "_".join(utilities.filter_empty_not_empty_items([self.genus_lowercase,
+                                                                                    self.species_lowercase,
+                                                                                    self.strain_lowercase,
+                                                                                    self.sex_lowercase])["not_empty"])
 
         self.dataset_prefix = self.strain_sex
 
-- 
GitLab