Custom field in custom script does not save to database #9672
-
Hi, I am kind of stuck on why the following piece of custom script code does not update the VirtualMachine. Script Log
I do get a change log update but nothing is changed. the custom field updated is still None. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Just to check the obvious: you have created a Custom Field definition called "updated" in the Netbox UI, and set its data type to "boolean"? And you've associated this Custom Field definition with content type "Virtualization > virtual machine" ? (Although if you hadn't done all that, the "clean" operation should have raised an exception) And what Netbox version are you running? |
Beta Was this translation helpful? Give feedback.
-
Yes I added it, I also did a test with a vm that has (via GUI) the value True . Then I go to the self.log_info("update is already True") part version v3.2.2 |
Beta Was this translation helpful? Give feedback.
Just to check the obvious: you have created a Custom Field definition called "updated" in the Netbox UI, and set its data type to "boolean"? And you've associated this Custom Field definition with content type "Virtualization > virtual machine" ?
(Although if you hadn't done all that, the "clean" operation should have raised an exception)
And what Netbox version are you running?