From da33e4119da278c5ce7e5b78d0c9cf3be3d9e7b6 Mon Sep 17 00:00:00 2001 From: Jan Krupa Date: Fri, 30 Aug 2024 12:04:31 +0200 Subject: [PATCH] API token is passed to retrieve version - 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. --- pynetbox/core/api.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pynetbox/core/api.py b/pynetbox/core/api.py index ac17d75..6e6ccf5 100644 --- a/pynetbox/core/api.py +++ b/pynetbox/core/api.py @@ -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