From b5eebcb970dca395f4e199fc26cc6971798a951d Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 30 May 2017 11:34:41 +0100 Subject: Set target frame to None when empty string --- mammoth/docx/body_xml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mammoth/docx') diff --git a/mammoth/docx/body_xml.py b/mammoth/docx/body_xml.py index 3e3e027..a087191 100644 --- a/mammoth/docx/body_xml.py +++ b/mammoth/docx/body_xml.py @@ -297,7 +297,7 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f def hyperlink(element): relationship_id = element.attributes.get("r:id") anchor = element.attributes.get("w:anchor") - target_frame = element.attributes.get("w:tgtFrame") + target_frame = element.attributes.get("w:tgtFrame") or None children_result = _read_xml_elements(element.children) def create(**kwargs): -- cgit v1.2.3