Fix API grouping parameter not defaulting to match setting

This commit is contained in:
JonnyWong16 2020-04-07 18:18:16 -07:00
parent 1326ad8708
commit 47610323b0
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 78 additions and 40 deletions

View file

@ -1264,8 +1264,10 @@ def mask_config_passwords(config):
return config
def bool_true(value):
if value is True or value == 1:
def bool_true(value, return_none=False):
if value is None and return_none:
return None
elif value is True or value == 1:
return True
elif isinstance(value, basestring) and value.lower() in ('1', 'true', 't', 'yes', 'y', 'on'):
return True