Setting isPermaLink attrib to false when the guid is not a link
This commit is contained in:
parent
00b1cbdb1d
commit
620f4c3d20
|
@ -256,9 +256,15 @@ def _add_subelem(root_element, name, value):
|
|||
subElem = ET.SubElement(root_element, name)
|
||||
for key in value:
|
||||
_add_subelem(subElem, key, value[key])
|
||||
else:
|
||||
if name == "guid" and not value.startswith("http"):
|
||||
el = ET.SubElement(root_element, name)
|
||||
el.text = value
|
||||
el.attrib["isPermaLink"] = "false"
|
||||
else:
|
||||
ET.SubElement(root_element, name).text = value
|
||||
|
||||
|
||||
def _stringify(tree, pretty):
|
||||
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue