diff --git a/src/pypaperless/models/base.py b/src/pypaperless/models/base.py index e398145..50a6896 100644 --- a/src/pypaperless/models/base.py +++ b/src/pypaperless/models/base.py @@ -36,12 +36,14 @@ class HelperBase(PaperlessBase, Generic[ResourceT]): """Base class for all helpers in PyPaperless.""" _resource: PaperlessResource + _resource_public: bool = True def __init__(self, api: "Paperless") -> None: """Initialize a `HelperBase` instance.""" super().__init__(api) - self._api.local_resources.add(self._resource) + if self._resource_public: + self._api.local_resources.add(self._resource) @property def is_available(self) -> bool: @@ -72,6 +74,7 @@ class PaperlessModel(PaperlessBase): def __init__(self, api: "Paperless", data: dict[str, Any]) -> None: """Initialize a `PaperlessModel` instance.""" super().__init__(api) + self._data = {} self._data.update(data) self._fetched = False diff --git a/src/pypaperless/models/status.py b/src/pypaperless/models/status.py index 76d9db1..469416b 100644 --- a/src/pypaperless/models/status.py +++ b/src/pypaperless/models/status.py @@ -51,6 +51,7 @@ class StatusHelper(HelperBase[Status]): _api_path = API_PATH["status"] _resource = PaperlessResource.STATUS + _resource_public = False _resource_cls = Status