Open
Description
NetBox version
v3.5.1
Python version
3.10
Steps to Reproduce
- Create object-type custom field with Interface as content type and Tag as object type
- Assign a tag to this custom field on an interface
- Delete the tag
- Querying the custom fields on the interface through GraphQL will still show the field as being set to the id of the deleted tag
Expected Behavior
GraphQL output like this:
{
"data": {
"interface": {
"custom_fields": {
"FooCustomField": null
}
}
}
}
Observed Behavior
GraphQL output like this:
{
"data": {
"interface": {
"custom_fields": {
"FooCustomField": 42
}
}
}
}
Note that the field will be null in both the Web interface and REST API - I believe that what happens is that the underlying custom_field_data on the interface is not cleared, but that the Web/API layer knows to nullify the invalid reference