Skip to content

Commit

Permalink
fix: missing namespace for empty XML elements
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Horton <paul.horton@owasp.org>
  • Loading branch information
madpah committed Sep 15, 2022
1 parent 01743f2 commit f3659ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion serializable/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def _as_xml(self: _T, view_: Type[Any] = None, as_string: bool = True, element_n
new_key = prop_info.custom_names.get(SerializationType.XML, new_key)

if v is None:
ElementTree.SubElement(this_e, new_key)
ElementTree.SubElement(this_e, _namespace_element_name(tag_name=new_key, xmlns=xmlns))
continue

if new_key == '.':
Expand Down

0 comments on commit f3659ab

Please sign in to comment.