Front Ports count is not updated when removing rear ports. #8870

Closed
opened 2025-12-29 20:42:22 +01:00 by adam · 2 comments
Owner

Originally created by @Chiniquy on GitHub (Nov 22, 2023).

NetBox version

v3.6.5

Python version

3.8

Steps to Reproduce

Create a device (preferably of a device type without any front or rear ports).
On this device, create a rear port with name "test" and type "Other", with 2 positions.
Create 2 frontports by using "test [1-2]" as name, with type "Other", and select the 2 positions of the newly created rear port.
Now remove the rear port that you created.
On the device view you will now see a "2" on the Front port tab, but there will be no Front Ports inside the tab.

Expected Behavior

If the Front Ports are deleted, then the "2" on the Front Port tab should not be there, and the tab should not be visible.

Observed Behavior

The Front Port tab shows the number "2", indicating the existance of 2 Front Ports. However, when clicking on the Front Port tab, no Front Ports are visible.

Originally created by @Chiniquy on GitHub (Nov 22, 2023). ### NetBox version v3.6.5 ### Python version 3.8 ### Steps to Reproduce Create a device (preferably of a device type without any front or rear ports). On this device, create a rear port with name "test" and type "Other", with 2 positions. Create 2 frontports by using "test [1-2]" as name, with type "Other", and select the 2 positions of the newly created rear port. Now remove the rear port that you created. On the device view you will now see a "2" on the Front port tab, but there will be no Front Ports inside the tab. ### Expected Behavior If the Front Ports are deleted, then the "2" on the Front Port tab should not be there, and the tab should not be visible. ### Observed Behavior The Front Port tab shows the number "2", indicating the existance of 2 Front Ports. However, when clicking on the Front Port tab, no Front Ports are visible.
adam added the type: bugstatus: duplicate labels 2025-12-29 20:42:22 +01:00
adam closed this issue 2025-12-29 20:42:22 +01:00
Author
Owner

@jeremystretch commented on GitHub (Nov 28, 2023):

It seems that the cascading deletion triggered by removing the rear port is not detected by the tracking logic.

@jeremystretch commented on GitHub (Nov 28, 2023): It seems that the cascading deletion triggered by removing the rear port is not detected by the tracking logic.
Author
Owner

@jeremystretch commented on GitHub (Nov 29, 2023):

I believe this is the same root problem covered by #14081, so I'm going to close this out as a duplicate (even though its focus is on a different symptom). Happy to reopen it if we see that the fix for #14081 does not resolve this.

@jeremystretch commented on GitHub (Nov 29, 2023): I believe this is the same root problem covered by #14081, so I'm going to close this out as a duplicate (even though its focus is on a different symptom). Happy to reopen it if we see that the fix for #14081 does not resolve this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8870