Skip to content

Commit 18d969f

Browse files
committed
Fix GetMixin to let it return an ApiObject
Fix `transip.mixins.GetMixin` by letting it return a `transip.base.ApiObject` instead of a dictionary. Signed-off-by: Roald Nefs <info@roaldnefs.com>
1 parent d1a8eea commit 18d969f

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)