Skip to content
Snippets Groups Projects
Commit 45046024 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

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

parent bb1fba00
No related branches found
No related tags found
No related merge requests found
......@@ -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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment