Open v0tti opened 1 week ago
The description
field defined on the Script class collides with its description
property (which returns self.Meta.description
).
The obvious workaround is to rename the field in the script, but within NetBox we should raise an error for such conflicts and/or namespace the properties somehow.
Thanks for your comment. I have renamed the description
StringVar
field on all our custom scripts and the REST API is working fine now.
This was not an issue until we upgraded to NetBox 4.1 and even then only the API was having problems. The scripts themselves worked fine. I also could not find any mention of this in the announced breaking change.
Deployment Type
Self-hosted
NetBox Version
v4.1.0
Python Version
3.11
Steps to Reproduce
class DemoScript(Script): description = StringVar()
<class 'TypeError'>
Object of type StringVar is not JSON serializable
Python version: 3.11.9 NetBox version: 4.1.0