Handle bools in bool_value call

This commit is contained in:
Ramon Wenger 2021-01-14 17:10:48 +01:00
parent dbee7889b7
commit 5b3777cb87
1 changed files with 3 additions and 0 deletions

View File

@ -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