diff --git a/pillar/web/nodes/forms.py b/pillar/web/nodes/forms.py index 8fd26030..714d3779 100644 --- a/pillar/web/nodes/forms.py +++ b/pillar/web/nodes/forms.py @@ -168,8 +168,8 @@ def process_node_form(form, node_id=None, node_type=None, user=None): if schema_prop['type'] == 'dict': data = attachments.attachment_form_parse_post_data(data) elif schema_prop['type'] == 'integer': - if data == '': - data = 0 + if not data: + data = None else: data = int(form[prop_name].data) elif schema_prop['type'] == 'float':