Handle bools in bool_value call
This commit is contained in:
parent
dbee7889b7
commit
5b3777cb87
|
|
@ -31,6 +31,9 @@ def bool_value(value, default=False):
|
||||||
:param bool default: "Default value if unable to convert"
|
:param bool default: "Default value if unable to convert"
|
||||||
:rtype: bool
|
:rtype: bool
|
||||||
"""
|
"""
|
||||||
|
if type(value) == bool:
|
||||||
|
return value
|
||||||
|
|
||||||
if not value:
|
if not value:
|
||||||
return default
|
return default
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue