Skip to content

Commit 17c6e19

Browse files
committed
check if id is present
1 parent ebac68a commit 17c6e19

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

hcloud/core/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def __getattr__(self, name: str): # type: ignore[no-untyped-def]
118118

119119
def _get_self(self) -> BoundModelBase[Domain]:
120120
assert hasattr(self._client, "get_by_id")
121+
assert hasattr(self.data_model, "id")
121122
return self._client.get_by_id(self.data_model.id) # type: ignore
122123

123124
def reload(self) -> None:

0 commit comments

Comments
 (0)