Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Custom Fields can be displayed but not updated. Not sure if this is already implemented in the gem.

netbox_identifier = 999
netbox_record= NetboxClientRuby.virtualization.virtual_machines.find_by(id: netbox_identifier)
puts netbox_record.custom_fields
netbox_record.custom_fields['my_field'] = "New Value"
netbox_record.save

completes without any error, but does not update the custom fields in netbox. Updating the name or description however works perfectly.

You must be logged in to vote

Replies: 1 comment

Comment options

nevermind, if you assign the custom_fields directly it works

netbox_record.custom_fields = netbox_record.custom_fields.merge({'my_field': "New Value"})
netbox_record.save
You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #101 on May 26, 2025 13:42.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.