Fix an environment variable that should be set with a numerical value of 0 (i.e. end up as "0" or "0.0") is set to an empty string

This commit is contained in:
allegroai 2023-11-01 15:04:59 +02:00
parent 21e4be966f
commit 5b86c230c1

View File

@ -31,7 +31,8 @@ def apply_environment(config):
keys = list(filter(None, env_vars.keys())) keys = list(filter(None, env_vars.keys()))
for key in keys: for key in keys:
os.environ[str(key)] = str(env_vars[key] or "") value = env_vars[key]
os.environ[str(key)] = str(value if value is not None else "")
return keys return keys