Default values for object custom fields are not checked for validity #12400
Labels
status: accepted
This issue has been accepted for implementation
type: bug
A confirmed report of unexpected behavior in the application
NetBox version
v3.5.0
Python version
3.11
Steps to Reproduce
[1]
Expected Behavior
Creation of custom field is aborted because default value is not valid for this type. The default value should be an int instead of a list.
Even better: default object is checked for existence. This does not guarantee that the object exists later, because it could be deleted later.
Observed Behavior
Custom field is created and the previously create prefix can not be viewed:
If the default value is syntactically correct but the object does not exist, the value for the custom field is displayed as
null
Same goes for a multi-object custom field with a single int as default, except for a different error message:
'int' object is not iterable
The text was updated successfully, but these errors were encountered: