mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 17:43:14 +00:00
Fix inconsistent dict member extension
If two portions of a list come back piecewise from the plugin that are both lists, extend them rather than making a nested list.
This commit is contained in:
parent
a20b0abb43
commit
308db99dbb
@ -741,7 +741,10 @@ def _assemble_json(responses, resource=None, url=None, extension=None):
|
||||
for dk in rsp.iterkeys():
|
||||
if dk in rspdata:
|
||||
if isinstance(rspdata[dk], list):
|
||||
rspdata[dk].append(rsp[dk])
|
||||
if isinstance(rsp[dk], list):
|
||||
rspdata[dk].extend(rsp[dk])
|
||||
else:
|
||||
rspdata[dk].append(rsp[dk])
|
||||
else:
|
||||
rspdata[dk] = [rspdata[dk], rsp[dk]]
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user