From 3d9fbd598e9cfae092459559f6e0950b936b2420 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 24 Nov 2024 17:20:29 -0600 Subject: [PATCH] fix: fix default form value logic for bool checkbox fields --- src/wuttaweb/forms/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wuttaweb/forms/base.py b/src/wuttaweb/forms/base.py index ceaeeb7..9dd6760 100644 --- a/src/wuttaweb/forms/base.py +++ b/src/wuttaweb/forms/base.py @@ -1002,7 +1002,7 @@ class Form: # for now we explicitly translate here, ugh. also # note this does not yet allow for null values.. :( if isinstance(field.typ, colander.Boolean): - value = True if field.typ.true_val else False + value = True if value == field.typ.true_val else False model_data[field.oid] = make_json_safe(value)