Skip to content

Commit

Permalink
feat: more controll over XML attribute serialization (#34)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
  • Loading branch information
jkowalleck authored Nov 29, 2023
1 parent e80c514 commit 38f42d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion serializable/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ def as_xml(self: Any, view_: Optional[Type[ViewType]] = None,
new_key = CurrentFormatter.formatter.encode(property_name=new_key)

if prop_info.custom_type and prop_info.is_helper_type():
v = prop_info.custom_type.xml_serialize(v)
v = prop_info.custom_type.xml_normalize(
v, view=view_, element_name=new_key, xmlns=xmlns, prop_info=prop_info, ctx=self.__class__)
elif prop_info.is_enum:
v = v.value

Expand Down

0 comments on commit 38f42d6

Please sign in to comment.