Skip to content

Commit

Permalink
fix: support ENUM in XML Attributes
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 Aug 22, 2022
1 parent 8995505 commit f2f0922
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions serializable/__init__.py
Expand Up @@ -367,6 +367,8 @@ def _from_xml(cls: Type[_T], data: Union[TextIOWrapper, ElementTree.Element],

if prop_info.custom_type and prop_info.is_helper_type():
_data[decoded_k] = prop_info.custom_type.deserialize(v)
elif prop_info.is_enum:
_data[decoded_k] = prop_info.concrete_type(v)
elif prop_info.is_primitive_type():
_data[decoded_k] = prop_info.concrete_type(v)
else:
Expand Down

0 comments on commit f2f0922

Please sign in to comment.