From 30e72a31dfbf26e56f9bc6fffa979ebe9b2c28f4 Mon Sep 17 00:00:00 2001
From: Loraine Gueguen <loraine.gueguen@sb-roscoff.fr>
Date: Fri, 21 May 2021 15:26:12 +0200
Subject: [PATCH] fix default value for go

---
 speciesData.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/speciesData.py b/speciesData.py
index de54d78..2c16840 100755
--- a/speciesData.py
+++ b/speciesData.py
@@ -49,10 +49,12 @@ class SpeciesData:
 
     def set_service_attribute(self, service, parameters_dictionary):
         parameters_dictionary_services = parameters_dictionary[constants.ORG_PARAM_SERVICES]
-        if(service in parameters_dictionary_services.keys() and parameters_dictionary_services[service] != ""):
-            return parameters_dictionary_services[service]
-        else:
-            return "0"
+        service_value = "0"
+        if(service in parameters_dictionary_services.keys()
+                and parameters_dictionary_services[service] is not None
+                and parameters_dictionary_services[service] != ""):
+            service_value = parameters_dictionary_services[service]
+        return service_value
 
     def __init__(self, parameters_dictionary):
         self.parameters_dictionary = parameters_dictionary
-- 
GitLab