From 516bf1e72a04334b2bc9a0873dc263a7672a5647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20M=C3=B6ller?= <leon.moeller@plt.rwth-aachen.de> Date: Thu, 8 Oct 2020 01:09:42 +0200 Subject: [PATCH] adapter.xml.xml_deserialization: fix parsing aasx package explorer files The AASX Package Explorer didn't to anything wrong, as the XML schema doesn't require the qualifier element to have any children. This commit removes the check. --- aas/adapter/xml/xml_deserialization.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/aas/adapter/xml/xml_deserialization.py b/aas/adapter/xml/xml_deserialization.py index 21155b3e..2f7656ce 100644 --- a/aas/adapter/xml/xml_deserialization.py +++ b/aas/adapter/xml/xml_deserialization.py @@ -442,8 +442,6 @@ class AASFromXmlDecoder: # TODO: simplify this should our suggestion regarding the XML schema get accepted # https://git.rwth-aachen.de/acplt/pyi40aas/-/issues/56 for constraint in element.findall(NS_AAS + "qualifier"): - if len(constraint) == 0: - raise KeyError(f"{_element_pretty_identifier(constraint)} has no constraint!") if len(constraint) > 1: logger.warning(f"{_element_pretty_identifier(constraint)} has more than one constraint, " "using the first one...") -- GitLab