Skip to content

Commit

Permalink
Fix a typo in DataElement.tostring()
Browse files Browse the repository at this point in the history
  • Loading branch information
brunato committed Feb 6, 2023
1 parent d320266 commit 581058c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xmlschema/dataobjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def tostring(self, namespaces: Optional[MutableMapping[str, str]] = None,
:return: a Unicode string.
"""
root, _ = self.encode(validation='lax')
if hasattr(root, 'nsmap'):
if not hasattr(root, 'nsmap'):
namespaces = self.get_namespaces(namespaces)

_string = etree_tostring(
Expand Down

0 comments on commit 581058c

Please sign in to comment.