From 56f09e1aa6552cb0182f3328f95aab50fe59b4b6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 14 Nov 2025 08:27:42 +1100 Subject: [PATCH] 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 8cb808f61347b76ed2db0c45151794c97b2af300) Co-authored-by: Oliver --- src/backend/InvenTree/InvenTree/config.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/backend/InvenTree/InvenTree/config.py b/src/backend/InvenTree/InvenTree/config.py index 600e9e7864..3a90896b8a 100644 --- a/src/backend/InvenTree/InvenTree/config.py +++ b/src/backend/InvenTree/InvenTree/config.py @@ -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: