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"
|
||||
:rtype: bool
|
||||
"""
|
||||
if type(value) == bool:
|
||||
return value
|
||||
|
||||
if not value:
|
||||
return default
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue