Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Molaron opened this issue Jan 14, 2025 · 1 comment
Closed

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

Molaron opened this issue Jan 14, 2025 · 1 comment
Labels
status: duplicate This issue has already been raised type: bug A confirmed report of unexpected behavior in the application

Comments

@Molaron
Copy link

Molaron commented 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."
    ]
}
@Molaron Molaron added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels Jan 14, 2025
@ITJamie
Copy link
Contributor

ITJamie commented Jan 14, 2025

This should be fixed in #18363.

There hasn't been a release yet

@Molaron Molaron closed this as completed Jan 15, 2025
@jeremystretch jeremystretch added status: duplicate This issue has already been raised and removed status: needs triage This issue is awaiting triage by a maintainer labels Jan 16, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: duplicate This issue has already been raised type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

3 participants