Skip to content

Commit

Permalink
[1720][dictization] unflatten update - handle case where data already…
Browse files Browse the repository at this point in the history
… contains an unflattened list (eg: of extras)
  • Loading branch information
johnglover committed Feb 21, 2012
1 parent 2ff67da commit abb7317
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ckan/lib/navl/dictization_functions.py
Expand Up @@ -366,7 +366,9 @@ def unflatten(data):
for flattend_key in sorted(data.keys(), key=flattened_order_key):
current_pos = unflattened

if len(flattend_key) > 1 and not flattend_key[0] in convert_to_list:
if (len(flattend_key) > 1
and not flattend_key[0] in convert_to_list
and not flattend_key[0] in unflattened):
convert_to_list.append(flattend_key[0])

for key in flattend_key[:-1]:
Expand Down

0 comments on commit abb7317

Please sign in to comment.