Skip to content

Commit

Permalink
Merge pull request #616 from btriller/api-version-4.x
Browse files Browse the repository at this point in the history
Fix API version for Netbox version > 4.x
  • Loading branch information
jeffgdotorg authored Jul 2, 2024
2 parents 1b397f0 + 0f905bd commit 9dc54a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pynetbox/core/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def get_version(self):
self.normalize_url(self.base),
headers=headers,
)
if req.ok:
if req.ok or req.status_code == 403:
return req.headers.get("API-Version", "")
else:
raise RequestError(req)
Expand Down

0 comments on commit 9dc54a9

Please sign in to comment.