From e11a749fa4dea0dc21f7d273d0327afc79bf8183 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 1 Jul 2015 15:14:04 -0400 Subject: [PATCH] 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. --- confluent_server/confluent/httpapi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/confluent_server/confluent/httpapi.py b/confluent_server/confluent/httpapi.py index 075dd315..c725a6ad 100644 --- a/confluent_server/confluent/httpapi.py +++ b/confluent_server/confluent/httpapi.py @@ -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: