Skip to content

Commit

Permalink
Update nb_inventory.py
Browse files Browse the repository at this point in the history
Fixes issue-netbox-community#1300
allows api_endpoint to be a variable and string
  • Loading branch information
bookshark13 authored Aug 15, 2024
1 parent 16d8677 commit cc7f991
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/inventory/nb_inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -1594,7 +1594,7 @@ def fetch_api_docs(self):
except Exception:
cached_api_version = None
cache = None

self.api_endpoint = self.templar.template( self.get_option("api_endpoint"), fail_on_undefined=False)
status = self._fetch_information(self.api_endpoint + "/api/status")
netbox_api_version = ".".join(status["netbox-version"].split(".")[:2])

Expand Down

0 comments on commit cc7f991

Please sign in to comment.