From e3657776530d1430f7f8ae9a19772d69c5c95408 Mon Sep 17 00:00:00 2001 From: Marko Ristin Date: Fri, 9 Jun 2023 10:15:33 +0200 Subject: [PATCH] [V3] Fix nullability check in AASc-3a-009 (#272) We mistakenly checked for nullability instead of *non-nullability* in the constraint AASc-3a-009. --- aas_core_meta/v3.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aas_core_meta/v3.py b/aas_core_meta/v3.py index 8b1d1329..161d706f 100644 --- a/aas_core_meta/v3.py +++ b/aas_core_meta/v3.py @@ -5626,8 +5626,10 @@ def is_BCP_47_for_english(text: str) -> bool: ) @invariant( lambda self: - not (self.data_type is None and self.data_type in IEC_61360_data_types_with_unit) - or ( + not ( + self.data_type is not None + and self.data_type in IEC_61360_data_types_with_unit + ) or ( self.unit is not None or self.unit_ID is not None ), "Constraint AASc-3a-009: If data type is a an integer, real or rational with "