Skip to content

Commit

Permalink
slightly more readable code
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Piskun <[email protected]>
  • Loading branch information
bigcat88 committed Oct 15, 2023
1 parent c907a26 commit 1e2c588
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nc_py_api/_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ def update_server_info(self) -> None:

@property
def user(self) -> str:
"""Current user ID. Can be different from login name."""
if not self._user and isinstance(self, NcSession): # do not trigger for NextcloudApp
"""Current user ID. Can be different from the login name."""
if isinstance(self, NcSession) and not self._user: # do not trigger for NextcloudApp
self._user = self.ocs(method="GET", path="/ocs/v1.php/cloud/user")["id"]
return self._user

Expand Down

0 comments on commit 1e2c588

Please sign in to comment.