Skip to content

Commit

Permalink
API token is passed to retrieve version
Browse files Browse the repository at this point in the history
- Updated the `version` property in `pynetbox/core/api.py` to pass the API token when calling `get_version`.
- No problem raised even if the token is None
- This change addresses the issue where `nb.version` returns an empty string when using an OIDC proxy, due to unauthorized requests being redirected to the login page.
  • Loading branch information
Kani999 committed Aug 30, 2024
1 parent eebdb76 commit da33e41
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pynetbox/core/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def version(self):
"""
version = Request(
base=self.base_url,
token=self.token,
http_session=self.http_session,
).get_version()
return version
Expand Down

0 comments on commit da33e41

Please sign in to comment.