Quick fix string instead of list
This commit is contained in:
parent
65c9e85e93
commit
1158c666e5
@ -132,7 +132,7 @@ def convert_properties(properties, node_schema):
|
|||||||
properties[prop] = convert_properties(
|
properties[prop] = convert_properties(
|
||||||
properties[prop], schema_prop['schema'])
|
properties[prop], schema_prop['schema'])
|
||||||
if prop_type == 'list':
|
if prop_type == 'list':
|
||||||
if properties[prop] == '':
|
if properties[prop] in ['', '[]']:
|
||||||
properties[prop] = []
|
properties[prop] = []
|
||||||
for k, val in enumerate(properties[prop]):
|
for k, val in enumerate(properties[prop]):
|
||||||
if not 'schema' in schema_prop:
|
if not 'schema' in schema_prop:
|
||||||
@ -160,8 +160,8 @@ class ValidateCustomFields(Validator):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
value = convert_properties(value, node_type['dyn_schema'])
|
value = convert_properties(value, node_type['dyn_schema'])
|
||||||
except:
|
except Exception, e:
|
||||||
print ("Error converting")
|
print ("Error converting: {0}".format(e))
|
||||||
print (value)
|
print (value)
|
||||||
|
|
||||||
v = Validator(node_type['dyn_schema'])
|
v = Validator(node_type['dyn_schema'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user