Improve handling of empty lists when nesting
This commit is contained in:
parent
f0724ede3f
commit
542aea2fe4
@ -261,7 +261,9 @@ def nested(input):
|
|||||||
for x in input:
|
for x in input:
|
||||||
if isinstance(x, list):
|
if isinstance(x, list):
|
||||||
if len(x) > 0:
|
if len(x) > 0:
|
||||||
l.append('{' + nested(x) + '}')
|
n = nested(x)
|
||||||
|
if n != '':
|
||||||
|
l.append('{' + n + '}')
|
||||||
else:
|
else:
|
||||||
if x is not None:
|
if x is not None:
|
||||||
if x != '':
|
if x != '':
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user