if val is not None:
# take a list and create a CommaDelimitedList
if v.type() == properties.LIST:
- if isinstance(val[0], dict):
+ if len(val) == 0:
+ val = ''
+ elif isinstance(val[0], dict):
flattened = []
for (i, item) in enumerate(val):
for (k, v) in iter(item.items()):
'Parameters': {
'Foo': {'Type': 'String'},
'AList': {'Type': 'CommaDelimitedList'},
+ 'ListEmpty': {'Type': 'CommaDelimitedList'},
'ANum': {'Type': 'Number'},
'AMap': {'Type': 'Json'},
},
properties_schema = {
"Foo": {"Type": "String"},
"AList": {"Type": "List"},
+ "ListEmpty": {"Type": "List"},
"ANum": {"Type": "Number"},
"AMap": {"Type": "Map"}
}
"Properties": {
"Foo": "Bar",
"AList": ["one", "two", "three"],
+ "ListEmpty": [],
"ANum": 5,
"AMap": map_prop_val
}