Skip to content

Commit

Permalink
Ensure APIObject.to_dict() actually returns a dict (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtomlinson authored Mar 7, 2025
1 parent 11892fe commit 7178239
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kr8s/_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def api(self, value):
self._api = value

@property
def raw(self) -> Any:
def raw(self) -> Box:
"""Raw object returned from the Kubernetes API."""
self._raw.update({"kind": self.kind, "apiVersion": self.version})
return self._raw
Expand Down Expand Up @@ -723,7 +723,7 @@ async def async_adopt(self, child: APIObject) -> None:

def to_dict(self) -> dict:
"""Return a dictionary representation of this object."""
return self.raw
return self.raw.to_dict()

def to_lightkube(self) -> Any:
"""Return a lightkube representation of this object."""
Expand Down

0 comments on commit 7178239

Please sign in to comment.