[11] fix KeyError

This commit is contained in:
meisnate12 2024-04-08 14:18:19 -04:00
parent fc186e4821
commit 8ecf8fdb8e
2 changed files with 2 additions and 2 deletions

View file

@ -1 +1 @@
1.21.0-develop10
1.21.0-develop11

View file

@ -394,7 +394,7 @@ class DataFile:
var_name = var_key[:-7]
con_var_value = util.parse(self.data_type, var_key, var_value, datatype="bool", default=False)
if con_var_value:
if (var_name not in variables or variables[var_name] is None) and (var_name not in default and default[var_name] is None):
if (var_name not in variables or variables[var_name] is None) and (var_name not in default or default[var_name] is None):
error_text = "- does not exist"
elif (var_name in variables and variables[var_name] is not None) or (var_name in default and default[var_name] is not None):
error_text = "- exists"