Commit e0b0f05a authored by Jan Reimes's avatar Jan Reimes
Browse files

fix(refactor): Restore missing attributes after config consolidation

- Renamed PortalClient._http_config → _http_cache and fixed parameter name
  in _get_session() to match the new config structure.
- Added TDocDatabase.connection property to replace the removed attribute,
  preserving backward compatibility for tests.
parent 3e7ae19d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -299,7 +299,7 @@ class PortalClient:
        """
        if self._session is None:
            self._session = create_cached_session(
                http_cache=self._http_cache,
                http_config=self._http_cache,
                cache_manager_name=self._cache_manager_name,
                verify=self._verify_resolved,
            )
+11 −0
Original line number Diff line number Diff line
@@ -36,6 +36,17 @@ class DocDatabase:
        self.cache_dir = db_file.parent
        self._database: AsyncDatabase | None = None

    @property
    def connection(self) -> AsyncDatabase:
        """Return the underlying AsyncDatabase connection.

        Raises:
            DatabaseError: If accessed outside of context manager
        """
        if self._database is None:
            raise DatabaseError.connection_not_open()
        return self._database

    # ------------------------------------------------------------------
    # Context manager lifecycle
    # ------------------------------------------------------------------