Skip to content

Commit

Permalink
Update ogr/services/forgejo/user.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 3b2de4e commit 6fcdc7b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ogr/services/forgejo/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ def __init__(self, service: "forgejo.ForgejoService") -> None:
def __str__(self) -> str:
return f'ForgejoUser(username="{self.get_username()}")'

@property
@cached_property
def forgejo_user(self):
if not self._forgejo_user:
self._forgejo_user = self.service.api.user.get_current()
return self._forgejo_user
return self.service.api.user.get_current()

def get_username(self) -> str:
return self.forgejo_user.login

0 comments on commit 6fcdc7b

Please sign in to comment.