Commit 4cb3d7ce authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update converter._to_field and to_model to fix a bug.

parent 6f78d8ba
......@@ -144,7 +144,7 @@ def _to_field(field, linkedcombo=True, **kwargs):
# in addition the JSON dumps will failed
# therefore the default value are limited to types which can be JSONify.
default = field.default
if default and isinstance(default, JSON_TYPES):
if default is not None and isinstance(default, JSON_TYPES):
cfg["value"] = default
# the checkBox is rendered initially checked
......@@ -806,7 +806,7 @@ def to_model(table):
# therefore the default value are limited to types which
# can be JSONifyied.
default = field.default
if default and isinstance(default, JSON_TYPES):
if default is not None and isinstance(default, JSON_TYPES):
field_cfg['defaultValue'] = default
cfg['fields'].append(field_cfg)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment