MAC address not shown as "primary for interface" in MAC address detail view #10670

Closed
opened 2025-12-29 21:34:30 +01:00 by adam · 2 comments
Owner

Originally created by @rodvand on GitHub (Jan 19, 2025).

Originally assigned to: @bctiemann on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.2.2

Python Version

3.12

Steps to Reproduce

  1. Create a device (device1) (any device type)
  2. Create an interface (eth1) (any type)
  3. Create a MAC address (AA:AB:CC:DD:EE:FF) and assign it to the device1 and interface eth1
  4. Go to interface eth1 on device1 and edit the device
  5. Assign the MAC address AA:AB:CC:DD:EE:FF as the primary MAC address
  6. Go to the MAC address view and select the AA:AB:CC:DD:EE:FF address

Expected Behavior

In the detail view I expect the "Primary for interface" to be a green checkmark.

Observed Behavior

It's red to indicate it is not primary for any interface.

Originally created by @rodvand on GitHub (Jan 19, 2025). Originally assigned to: @bctiemann on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.2.2 ### Python Version 3.12 ### Steps to Reproduce 1. Create a device (device1) (any device type) 2. Create an interface (eth1) (any type) 3. Create a MAC address (AA:AB:CC:DD:EE:FF) and assign it to the device1 and interface eth1 4. Go to interface eth1 on device1 and edit the device 5. Assign the MAC address AA:AB:CC:DD:EE:FF as the primary MAC address 6. Go to the MAC address view and select the AA:AB:CC:DD:EE:FF address ### Expected Behavior In the detail view I expect the "Primary for interface" to be a green checkmark. ### Observed Behavior It's red to indicate it is not primary for any interface.
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:34:30 +01:00
adam closed this issue 2025-12-29 21:34:31 +01:00
Author
Owner

@rodvand commented on GitHub (Jan 19, 2025):

From my limited Django and python skills it does not look like the is_primary d11deb6678/netbox/templates/dcim/macaddress.html (L37) is defined anywhere on the model.

@rodvand commented on GitHub (Jan 19, 2025): From my limited Django and python skills it does not look like the `is_primary` https://github.com/netbox-community/netbox/blob/d11deb66788c35ccb50eccdbd6bd2518733e2801/netbox/templates/dcim/macaddress.html#L37 is defined anywhere on the model.
Author
Owner

@devon-mar commented on GitHub (Jan 20, 2025):

From my limited Django and python skills it does not look like the is_primary

netbox/netbox/templates/dcim/macaddress.html

Line 37 in d11deb6

{% checkmark object.is_primary %} is defined anywhere on the model.

Yeah, that's the issue.

Could I be assigned to this? I have a patch ready.

@devon-mar commented on GitHub (Jan 20, 2025): > From my limited Django and python skills it does not look like the `is_primary` > > [netbox/netbox/templates/dcim/macaddress.html](https://github.com/netbox-community/netbox/blob/d11deb66788c35ccb50eccdbd6bd2518733e2801/netbox/templates/dcim/macaddress.html#L37) > > Line 37 in [d11deb6](/netbox-community/netbox/commit/d11deb66788c35ccb50eccdbd6bd2518733e2801) > <td>{% checkmark object.is_primary %}</td> > is defined anywhere on the model. Yeah, that's the issue. Could I be assigned to this? I have a patch ready.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10670