Skip to content

Commit

Permalink
[V3] Fix nullability check in AASc-3a-009 (#272)
Browse files Browse the repository at this point in the history
We mistakenly checked for nullability instead of *non-nullability* in
the constraint AASc-3a-009.
  • Loading branch information
mristin committed Jun 9, 2023
1 parent 1424354 commit e365777
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions aas_core_meta/v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down

0 comments on commit e365777

Please sign in to comment.