You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: object/multi-object custom fields rejected by NetBox 4.x (object gets no updates) #522
Any device/VM carrying a populated object or multi-object custom field is PATCHed with the full serialized object representation, which NetBox 4.x rejects — and the object then receives no updates at all on any field, on every run.
Cause
The fix from #452 (5c8e54cd, "handle object and multi-object custom fields correctly") never triggers when custom fields are loaded from the NetBox API, for three reasons:
The API reports the field type as a dict — {"value": "multiobject", "label": "Multiple objects"} — so grab(custom_field, "data.type") == "object" (a plain-string comparison) is always False.
NetBox's actual type value for multi-object fields is multiobject (CustomFieldTypeChoices.TYPE_MULTIOBJECT), not multi-object.
Only the new (incoming) custom-field values are reduced to IDs. Object custom fields that are not part of the update — e.g. one maintained by another tool — get merged into the payload from current NetBox data (new_value = {**current_value, **new_value}) and are still sent as their full serialized representation.
Impact / reproduction
Against NetBox 4.5.10 with a multi-object tenant custom field: a VM carrying that field is PATCHed and NetBox responds
{'custom_fields': ["Cannot resolve keyword 'display' into field. ..."]}
The object then receives no updates on any field, every run.
Fix
Normalize the dict type form to its value before comparing.
Accept multiobject (keep multi-object for compatibility).
Reduce current and new custom-field values to IDs before merging/comparing (covers fields merged in from current data, and keeps both sides comparable so unchanged object CFs stop reporting a change every run).
Add multiobject to the valid type list in NBCustomField.data_model.
Fixed in development by #524 (merged): object/multi-object custom fields are reduced to ids on both sides of the comparison and NetBox 4.x's multiobject type is accepted. Thanks @eric-eisenhart. Ships with the next release.
Activity
semx commentedon Sep 9, 2026
Fixed in
developmentby #524 (merged): object/multi-object custom fields are reduced to ids on both sides of the comparison and NetBox 4.x'smultiobjecttype is accepted. Thanks @eric-eisenhart. Ships with the next release.