pynetbox
pynetbox copied to clipboard
Object update not working for custom fields
pynetbox version
v7.3.3
NetBox version
v4.0.3
Python version
3.11
Steps to Reproduce
Hi all!
I have trying to change an existing IP address's custom field (MAC address) and the code runs successfully but the change is not made to the IP address.
I have tried with these approaches:
With Endpoint update:
netbox.ipam.ip_addresses.update([{
"id": netbox_ip.id,
"custom_fields": {
"Computer_MAC": "some new string mac"
}
}])
With Respons - request update:
ip_address = netbox.ipam.ip_addresses.get(netbox_ip.id)
ip_address.update({
"custom_fields": {
"Computer_MAC": "some new string mac"
}
})
In previous Netbox versions this script runned successfully so I think something has changed in the API and Django structure.
Expected Behavior
The custom field of the IP address has changed.
Observed Behavior
The custom field of the IP address has not changed.