From eb12e5b437e1aea24387b32a8e22bf438b5c07c2 Mon Sep 17 00:00:00 2001 From: Loraine Gueguen <loraine.gueguen@sb-roscoff.fr> Date: Sun, 16 May 2021 12:15:36 +0200 Subject: [PATCH] fix condition in get_unique_species_dict_list() --- utilities.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utilities.py b/utilities.py index 884563a..808e33e 100755 --- a/utilities.py +++ b/utilities.py @@ -158,7 +158,8 @@ def get_unique_species_dict_list(sp_dict_list): for sp in sp_dict_list: gspecies = get_gspecies_string_from_sp_dict(sp) - if gspecies not in unique_species_dict.keys() or sp[constants.ORG_PARAM_DESC][constants.ORG_PARAM_DESC_MAIN_SPECIES] == True : + if gspecies not in unique_species_dict.keys() or ( constants.ORG_PARAM_DESC_MAIN_SPECIES in sp[constants.ORG_PARAM_DESC].keys() and + sp[constants.ORG_PARAM_DESC][constants.ORG_PARAM_DESC_MAIN_SPECIES] == True ) : unique_species_dict[gspecies] = sp else: continue -- GitLab