Skip to content
Snippets Groups Projects
Commit 12009e55 authored by Loraine Gueguen's avatar Loraine Gueguen
Browse files

fix get_gspecies_string_from_sp_dict

parent 49659b20
No related branches found
No related tags found
2 merge requests!9Release 2.0 (merge dev to master),!8Release 2.0
This commit is part of merge request !8. Comments created here will be created in the context of that merge request.
......@@ -123,13 +123,9 @@ def get_species_history_id(instance, full_name):
def get_gspecies_string_from_sp_dict(sp_dict):
gspecies = ""
for k, v in sp_dict.items():
for k2, v2 in v.items():
if k2 == "genus":
gspecies = gspecies.lower() + v2
elif k2 == "species":
gspecies = gspecies.lower() + "_" + v2
genus = sp_dict["description"]["genus"]
species = sp_dict["description"]["species"]
gspecies = genus.lower() + "_" + species.lower()
return gspecies
def get_unique_species_str_list(sp_dict_list):
......@@ -164,7 +160,6 @@ def get_unique_species_dict_list(sp_dict_list):
unique_species_dict = {}
unique_species_list_of_dict = []
unique_species_genus_species = get_unique_species_str_list(sp_dict_list=sp_dict_list)
for sp in sp_dict_list:
gspecies = get_gspecies_string_from_sp_dict(sp)
......
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