Changed interpretation of '' in form handling of integer properties.
This commit is contained in:
parent
fcaa4fb936
commit
fd541d2243
@ -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':
|
||||
|
Loading…
x
Reference in New Issue
Block a user