Commit 846adc96 by Filippo Valsorda

Workaround lost XML attributes on the top element

parent f7f9d0d2
...@@ -84,7 +84,9 @@ class LightChildrenMixin(XBlockWithChildrenFragmentsMixin): ...@@ -84,7 +84,9 @@ class LightChildrenMixin(XBlockWithChildrenFragmentsMixin):
for child_id, xml_child in enumerate(node): for child_id, xml_child in enumerate(node):
cls.add_node_as_child(block, xml_child, child_id) cls.add_node_as_child(block, xml_child, child_id)
for name, value in attr: for name, value in node.attrib.items():
if value == "false": value = False
if value == "true": value = True
setattr(block, name, value) setattr(block, name, value)
return block return block
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment