Skip to content

Commit

Permalink
model.base: improve a ModelReference.resolve() error message
Browse files Browse the repository at this point in the history
  • Loading branch information
jkhsjdhjs authored and s-heppner committed Mar 14, 2024
1 parent d24e612 commit 04e06d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion basyx/aas/model/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ def resolve(self, provider_: "provider.AbstractObjectProvider") -> _RT:
# For ModelReferences, the first key must be an AasIdentifiable. So resolve the first key via the provider.
identifier: Optional[Identifier] = self.key[0].get_identifier()
if identifier is None:
raise AssertionError("Retrieving the identifier of the first key failed.")
raise AssertionError(f"Retrieving the identifier of the first {self.key[0]!r} failed.")

try:
item: Referable = provider_.get_identifiable(identifier)
Expand Down

0 comments on commit 04e06d6

Please sign in to comment.