Pass nested clusters through GLM as payload

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
This commit is contained in:
Christoph Auer 2024-12-03 13:58:27 +01:00
parent 4dcc738b6d
commit 0240ae2930

View File

@ -215,17 +215,21 @@ class GlmModel:
)
],
obj_type=layout_label_to_ds_type.get(element.label),
payload=TypeAdapter(List[Cluster]).dump_python(
element.cluster.children
), # hack to channel child clusters through GLM
payload={
"children": TypeAdapter(List[Cluster]).dump_python(
element.cluster.children
)
}, # hack to channel child clusters through GLM
)
)
elif isinstance(element, ContainerElement):
main_text.append(
BaseText(
payload=TypeAdapter(List[Cluster]).dump_python(
element.cluster.children
), # hack to channel child clusters through GLM
payload={
"children": TypeAdapter(List[Cluster]).dump_python(
element.cluster.children
)
}, # hack to channel child clusters through GLM
obj_type=layout_label_to_ds_type.get(element.label),
name=element.label,
prov=[