Fix invalid query to Netbox, search only with zone ID.

This commit is contained in:
Matěj D 2023-02-06 15:49:03 +01:00 committed by GitHub
parent d3c1d0f653
commit e752d3db22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ class NetBoxDNSSource(octodns.provider.base.BaseProvider):
"""Given a zone name and a view name, look it up in NetBox.
Raises: pynetbox.RequestError if declared view is not existant"""
view = "null" if not view else view
nb_zone = self._api.plugins.netbox_dns.zones.get(name=name[:-1], view=view)
nb_zone = self._api.plugins.netbox_dns.zones.get(name=name[:-1], view_id=view.id)
return nb_zone