diff --git a/hcloud/core/domain.py b/hcloud/core/domain.py index d57d52e..1ecf948 100644 --- a/hcloud/core/domain.py +++ b/hcloud/core/domain.py @@ -25,10 +25,10 @@ def __repr__(self) -> str: def _make_serializable(value: Any) -> dict | list | str | int | float: - if isinstance(value, BoundModelBase): - value = value.data_model + if isinstance(value, (BaseDomain, BoundModelBase)): + if isinstance(value, BoundModelBase): + value = value.data_model - if isinstance(value, BaseDomain): return {key: _make_serializable(getattr(value, key)) for key in value.__slots__} if isinstance(value, dict):