Skip to content

Commit e2552e5

Browse files
committed
Use enum value in exception message
1 parent 136e7ff commit e2552e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

infrahub_sdk/node/node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ async def get_flat_value(self, key: str, separator: str = "__") -> Any:
10531053

10541054
if rel.cardinality != RelationshipCardinality.ONE:
10551055
raise ValueError(
1056-
f"Can only look up flat value for relationships of cardinality {RelationshipCardinality.ONE}"
1056+
f"Can only look up flat value for relationships of cardinality {RelationshipCardinality.ONE.value}"
10571057
)
10581058

10591059
related_node: RelatedNode = getattr(self, first)
@@ -1679,7 +1679,7 @@ def get_flat_value(self, key: str, separator: str = "__") -> Any:
16791679

16801680
if rel.cardinality != RelationshipCardinality.ONE:
16811681
raise ValueError(
1682-
f"Can only look up flat value for relationships of cardinality {RelationshipCardinality.ONE}"
1682+
f"Can only look up flat value for relationships of cardinality {RelationshipCardinality.ONE.value}"
16831683
)
16841684

16851685
related_node: RelatedNodeSync = getattr(self, first)

0 commit comments

Comments
 (0)