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':
|
if schema_prop['type'] == 'dict':
|
||||||
data = attachments.attachment_form_parse_post_data(data)
|
data = attachments.attachment_form_parse_post_data(data)
|
||||||
elif schema_prop['type'] == 'integer':
|
elif schema_prop['type'] == 'integer':
|
||||||
if data == '':
|
if not data:
|
||||||
data = 0
|
data = None
|
||||||
else:
|
else:
|
||||||
data = int(form[prop_name].data)
|
data = int(form[prop_name].data)
|
||||||
elif schema_prop['type'] == 'float':
|
elif schema_prop['type'] == 'float':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user