Skip to content

Commit 9dc54a9

Browse files
authored
Merge pull request #616 from btriller/api-version-4.x
Fix API version for Netbox version > 4.x
2 parents 1b397f0 + 0f905bd commit 9dc54a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pynetbox/core/query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def get_version(self):
192192
self.normalize_url(self.base),
193193
headers=headers,
194194
)
195-
if req.ok:
195+
if req.ok or req.status_code == 403:
196196
return req.headers.get("API-Version", "")
197197
else:
198198
raise RequestError(req)

0 commit comments

Comments
 (0)