Bug fix for loading boolean settings (#10826) (#10828)

- Do not just cast to bool
- The string "False" casts to True in this case
- Use the function that supports strings

(cherry picked from commit 8cb808f613)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
github-actions[bot] 2025-11-14 08:27:42 +11:00 committed by GitHub
parent a1a2a47bba
commit 56f09e1aa6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -223,6 +223,11 @@ def do_typecast(value, type, var_name=None):
elif type is dict:
value = to_dict(value)
# Special handling for boolean typecasting
elif type is bool:
val = is_true(value)
return val
elif type is not None:
# Try to typecast the value
try: