Skip to content

Commit

Permalink
[V3] Fix AASd-116 (#271)
Browse files Browse the repository at this point in the history
We enforce global asset ID to be set if any of the specific asset IDs
are set to `globalAssetId`. The text of the invariant is a bit
ambiguous, so this has been discovered only eventually.
  • Loading branch information
mristin authored Jun 2, 2023
1 parent 8f18a8c commit 1424354
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions aas_core_meta/v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -2199,8 +2199,9 @@ def __init__(
(
specific_asset_ID.name != "globalAssetId"
) or (
specific_asset_ID.name == "globalAssetId" and
specific_asset_ID.value == self.global_asset_ID
self.global_asset_ID is not None
and specific_asset_ID.name == "globalAssetId"
and specific_asset_ID.value == self.global_asset_ID
)
for specific_asset_ID in self.specific_asset_IDs
)
Expand Down

0 comments on commit 1424354

Please sign in to comment.