summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-07-30 15:20:20 -0500
committerJohn Estabrook <jestabro@vyos.io>2025-07-30 15:37:44 -0500
commit9b164d6cb3f0729c403745e935e13863dec7928f (patch)
treef75ac1f6380af6d12c4d44fe8d5ab26bc9ab3c55 /python
parent57df93bb17da1653b1f090874f468ca8b4b3ce05 (diff)
downloadvyos-1x-9b164d6cb3f0729c403745e935e13863dec7928f.tar.gz
vyos-1x-9b164d6cb3f0729c403745e935e13863dec7928f.zip
T7672: collapse children field from list[tuple] to list[str]
A missing detail in the collapse function left children as a list of tuples (node name, node type).
Diffstat (limited to 'python')
-rw-r--r--python/vyos/xml_ref/op_definition.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/python/vyos/xml_ref/op_definition.py b/python/vyos/xml_ref/op_definition.py
index 95492cd17..1a4f53a3a 100644
--- a/python/vyos/xml_ref/op_definition.py
+++ b/python/vyos/xml_ref/op_definition.py
@@ -161,6 +161,7 @@ def collapse(d: OpData, acc: dict = None) -> tuple[dict, str, bool]:
out += '\n'
out += f'new: {new_data.file} {new_data.path}\n\n'
else:
+ new_data.children = list(map(lambda t: t[0], new_data.children))
acc[name] = {}
acc[name]['__node_data'] = asdict(new_data)
inner, o, e = collapse(v)