-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use .save() on tenant #304
Comments
With NetBox 2.9.11 and pynetbox 5.1.0 here, I don't see the problem:
In your test you also have double Edit: I see the |
I have a similar issue with Netbox 2.9.7 and pynetbox 5.1.0. Creating a new device with
is successful, but upgrading the interface of the new device (automatically created by Netbox since it is in the device type) with
is not successful. It throws the following error: The Netbox is installed at So maybe |
Looks like the problem is in |
Fixes #304: Change Record._endpoint_from_url() to count URL fields from the end
Netbox 2.9.10
pynetbox 5.1.0
Creating a tenant works:
tenant = nb.tenancy.tenants.create({'name': 'Tenant', 'slug': 'tenant'})
Trying to set the group on tenant:
tenant.group = 1
Doing tenant.save() results in:
pynetbox.core.query.RequestError: The requested url: https://server1.int.net/ipam-stage/api/api/tenancy/257/ could not be found
doing pprint(dict(tenant)):
{'comments': '',
'created': '2020-12-08',
'custom_fields': {},
'description': '',
'group': 1,
'id': 258,
'last_updated': '2020-12-08T19:28:12.002493Z',
'name': 'Tenant',
'slug': 'tenant',
'tags': [],
'url': 'https://server1.int.net/ipam-stage/api/tenancy/tenants/258/'}
It sees that pynetbox looses the "tenants" in the url between tenancy and id of tenant
The text was updated successfully, but these errors were encountered: