mac address object cannot be assigned an interface via REST API #10647

Closed
opened 2025-12-29 21:34:08 +01:00 by adam · 1 comment
Owner

Originally created by @Molaron on GitHub (Jan 14, 2025).

Deployment Type

Self-hosted

Triage priority

N/A

NetBox Version

v4.2.1

Python Version

3.10

Steps to Reproduce

  1. Create the following objects:
    • 1x device (we assume it's id 1001)
    • 1x interface assigned to the device (we assume it's id 2001)
    • 1x independent mac address object (we assume it's id 3001)
  2. Send a PATCH request to the following endpoint dcim/mac-addresses/3001/ with the following JSON body:
    • { "assigned_object_type": "dcim.interface", "assigned_object_id": 2001 }

Expected Behavior

The request should succeed and the interface should be assigned to the mac address.

Observed Behavior

The request fails with the following error message:

{
    "assigned_object_id": [
        "This field cannot be null."
    ]
}
Originally created by @Molaron on GitHub (Jan 14, 2025). ### Deployment Type Self-hosted ### Triage priority N/A ### NetBox Version v4.2.1 ### Python Version 3.10 ### Steps to Reproduce 1. Create the following objects: - 1x device (we assume it's id 1001) - 1x interface assigned to the device (we assume it's id 2001) - 1x independent mac address object (we assume it's id 3001) 3. Send a PATCH request to the following endpoint `dcim/mac-addresses/3001/` with the following JSON body: - `{ "assigned_object_type": "dcim.interface", "assigned_object_id": 2001 }` ### Expected Behavior The request should succeed and the interface should be assigned to the mac address. ### Observed Behavior The request fails with the following error message: ```json { "assigned_object_id": [ "This field cannot be null." ] } ```
adam added the type: bugstatus: duplicate labels 2025-12-29 21:34:08 +01:00
adam closed this issue 2025-12-29 21:34:08 +01:00
Author
Owner

@ITJamie commented on GitHub (Jan 14, 2025):

This should be fixed in https://github.com/netbox-community/netbox/issues/18363.

There hasn't been a release yet

@ITJamie commented on GitHub (Jan 14, 2025): This should be fixed in https://github.com/netbox-community/netbox/issues/18363. There hasn't been a release yet
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10647