default value in boolean fields is False if none is provided.

This commit is contained in:
Yann Leboulanger 2007-08-19 10:16:08 +00:00
parent bb1fba00b5
commit 45046024aa
1 changed files with 1 additions and 1 deletions

View File

@ -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')