default value in boolean fields is False if none is provided.
This commit is contained in:
parent
bb1fba00b5
commit
45046024aa
|
@ -170,7 +170,7 @@ class BooleanField(DataField):
|
|||
v = self.getTagData('value')
|
||||
if v in ('0', 'false'): return False
|
||||
if v in ('1', 'true'): return True
|
||||
if v is None: return None
|
||||
if v is None: return False # default value is False
|
||||
raise WrongFieldValue
|
||||
def fset(self, value):
|
||||
self.setTagData('value', value and '1' or '0')
|
||||
|
|
Loading…
Reference in New Issue