Fixed setting param to None in validation
This commit is contained in:
@@ -266,10 +266,11 @@ class Parameter:
|
||||
def validate(self: Parameter, v) -> tuple[bool, Any]:
|
||||
if v is None:
|
||||
is_value = False
|
||||
try:
|
||||
is_value = not isnan(v)
|
||||
except TypeError:
|
||||
is_value = True
|
||||
else:
|
||||
try:
|
||||
is_value = not isnan(v)
|
||||
except TypeError:
|
||||
is_value = True
|
||||
if is_value:
|
||||
if self.converter is not None:
|
||||
v = self.converter(v)
|
||||
|
||||
Reference in New Issue
Block a user