diff --git a/python/lib/core/dmod/core/dataset.py b/python/lib/core/dmod/core/dataset.py index 6a9f815dd..a2cb5dfe8 100644 --- a/python/lib/core/dmod/core/dataset.py +++ b/python/lib/core/dmod/core/dataset.py @@ -201,15 +201,18 @@ def manager(self) -> Optional[DatasetManager]: """ return self._manager - @manager.setter - def manager(self, value: DatasetManager = None): - self._manager = value if isinstance(value, DatasetManager) else None + def set_manager(self, value: DatasetManager): + """ + Sets the ::class:`DatasetManager` and updates the + ::attribute:`manager_uuid` property on this instances. - if value is not None: - # pydantic will not validate this, so we need to check it - if not isinstance(value.uuid, UUID): - raise ValueError(f"Expected UUID got {type(value.uuid)}") - self.manager_uuid = value.uuid + Parameters + ---------- + value: DatasetManager + The new value for ::attribute:`manager`. + """ + self._manager = value + self.manager_uuid = value.uuid def __hash__(self): members = [