Skip to content
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

Object update not working for custom fields #618

Open
haki99 opened this issue Jun 4, 2024 · 1 comment
Open

Object update not working for custom fields #618

haki99 opened this issue Jun 4, 2024 · 1 comment
Labels
pynetbox type: bug A confirmed report of unexpected behavior in the application

Comments

@haki99
Copy link

haki99 commented Jun 4, 2024

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.

@haki99 haki99 added the type: bug A confirmed report of unexpected behavior in the application label Jun 4, 2024
@haki99
Copy link
Author

haki99 commented Jun 5, 2024

#598 maybe solve this issue if I am right, but not sure about it.

Also mentioned in this issue: #597

@jeremystretch jeremystretch added the pynetbox label Nov 1, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pynetbox type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants