Skip to content

Commit 363e656

Browse files
authored
Merge pull request #3 from roaldnefs/fix-get-mixin
Fix GetMixin to let it return an ApiObject instead of a dictionary
2 parents 21cb3b5 + 18d969f commit 363e656

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

transip/mixins.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ def get(self, id: str, **kwargs) -> Optional[Type[ApiObject]]:
4242
path=self._path,
4343
id=id
4444
)
45-
obj: Type[ApiObject] = self.client.get(path)[self._resp_get_attr]
45+
obj: Type[ApiObject] = self._obj_cls( # type: ignore
46+
self.client.get(path)[self._resp_get_attr]
47+
)
4648
return obj
4749
return None
4850

0 commit comments

Comments
 (0)