Code

Ticket #3130: boolfield.diff

File boolfield.diff, 357 bytes (added by ben <ben.dean.kawamura@…>, 7 years ago)

Here's a quick patch to fix the problem

Line 
1Index: fields.py
2===================================================================
3--- fields.py   (revision 4193)
4+++ fields.py   (working copy)
5@@ -252,6 +252,8 @@
6 
7     def clean(self, value):
8         "Returns a Python boolean object."
9+        if value is None:
10+            value = False
11         Field.clean(self, value)
12         return bool(value)
13