if value is true or false convert it to a boolean

This commit is contained in:
Robin van Genderen 2019-07-02 12:25:00 +02:00
parent 145a4e4352
commit 2e97a42720

View File

@ -462,6 +462,10 @@ def advanced_inject(user, data, value_type='string'):
split_data = data.split('=')
value = split_data[1].lstrip().rstrip()
if value.lower() == 'true':
value = True
elif value.lower() == 'false':
value = False
if value_type == 'list':
value = value.split(',')