Skip to content

Commit

Permalink
Update ogr/services/forgejo/service.py
Browse files Browse the repository at this point in the history
Co-authored-by: Matej Focko <mfocko@users.noreply.github.com>
  • Loading branch information
majamassarini and mfocko authored Feb 14, 2025
1 parent c990047 commit 3b2de4e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ogr/services/forgejo/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ def __init__(
self._token = f"token {api_key}"
self._api = None

@property
@cached_property
def api(self):
if not self._api:
self._api = PyforgejoApi(base_url=self.instance_url, api_key=self._token)
return self._api
return PyforgejoApi(base_url=self.instance_url, api_key=self._token)

def get_project( # type: ignore[override]
self,
Expand Down

0 comments on commit 3b2de4e

Please sign in to comment.