2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-17 21:23:18 +00:00

Mandate that all http collections return children as list

Currently, an empty collection has no 'item' entry, a singleton value, or
a list depending on whether it has 0, 1, or more children.  Modify this so
that at least 1 and more children are consistent.
This commit is contained in:
Jarrod Johnson 2015-07-01 15:14:04 -04:00
parent 5a610f23ca
commit e11a749fa4

View File

@ -487,6 +487,8 @@ def _assemble_json(responses, resource, url, extension):
links[hk].append(haldata[hk])
else:
links[hk] = [links[hk], haldata[hk]]
elif hk == 'item':
links[hk] = [haldata[hk],]
else:
links[hk] = haldata[hk]
else: