Skip to content

Commit 64f5419

Browse files
author
Thomas Goodwin
committed
Fixed unformat_properties behavior to take a list of fields and convert it into the map it should be
1 parent 904eb99 commit 64f5419

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

rest/helper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ def _handle_value(val):
122122
out_val = []
123123
for v in val:
124124
if type(v) == dict:
125-
out_val.append({v['id']: _handle_value(v['value'])})
125+
if type(out_val) == list:
126+
out_val = {} # Change to map
127+
out_val.update({v['id']: _handle_value(v['value'])})
126128
else:
127129
out_val.append(v)
128130
return out_val

0 commit comments

Comments
 (0)