diff --git a/src/linkahead/common/models.py b/src/linkahead/common/models.py index ed80c60051f4c6c58c920490aa5363a135643085..aff85556ce3bf13396b43444e68f81cd26606b9c 100644 --- a/src/linkahead/common/models.py +++ b/src/linkahead/common/models.py @@ -5276,7 +5276,7 @@ def _parse_single_xml_element(elem: etree._Element): if str(elem.tag).lower() in classmap: klass = classmap.get(str(elem.tag).lower()) if klass is None: - raise LinkAheadException("No class for tag '{}' found.".format(elem.tag)) + raise LinkAheadException("No class for tag '{}' found.".format(str(elem.tag))) entity = klass() Entity._from_xml(entity, elem) @@ -5322,7 +5322,7 @@ def _parse_single_xml_element(elem: etree._Element): else: code = elem.get("code") return Message( - type=elem.tag, + type=str(elem.tag), code=int(code) if code is not None else None, description=elem.get("description"), body=elem.text,