booleanize value for ternary

pull/26614/head
Brian Coca 7 years ago
parent 3ff67fc217
commit 035b4b95b0

@ -205,7 +205,7 @@ def regex_search(value, regex, *args, **kwargs):
def ternary(value, true_val, false_val):
''' value ? true_val : false_val '''
if value:
if bool(value):
return true_val
else:
return false_val

Loading…
Cancel
Save