Skip to content

Commit

Permalink
Simplify condition
Browse files Browse the repository at this point in the history
  • Loading branch information
otto-ifak committed Sep 28, 2023
1 parent 639e9c9 commit 915a3b7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions basyx/aas/adapter/xml/xml_deserialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@ def _tag_replace_namespace(tag: str, nsmap: Dict[str, str]) -> str:
"""
split = tag.split("}")
for prefix, namespace in nsmap.items():
if prefix:
if namespace == split[0][1:]:
return prefix + ":" + split[1]
if prefix and namespace == split[0][1:]:
return prefix + ":" + split[1]
return tag


Expand Down

0 comments on commit 915a3b7

Please sign in to comment.