Allow config boolean options to default to None (#55951)

* Allow plugin boolean options to default to None

* fix mistake

* changelog

* be more specific
pull/56038/head
Sloane Hertel 6 years ago committed by Matt Davis
parent 89d767c046
commit 47b2cb748b

@ -0,0 +1,2 @@
bugfixes:
- Allow config options that are type boolean to default to None rather than only True or False.

@ -83,11 +83,11 @@ def ensure_type(value, value_type, origin=None):
if value_type:
value_type = value_type.lower()
if value_type in ('boolean', 'bool'):
value = boolean(value, strict=False)
if value is not None:
if value_type in ('boolean', 'bool'):
value = boolean(value, strict=False)
elif value is not None:
if value_type in ('integer', 'int'):
elif value_type in ('integer', 'int'):
value = int(value)
elif value_type == 'float':

Loading…
Cancel
Save