Skip to content
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

Error when deleting multiple cables #14023

Closed
penM000 opened this issue Oct 12, 2023 · 2 comments · Fixed by #14029
Closed

Error when deleting multiple cables #14023

penM000 opened this issue Oct 12, 2023 · 2 comments · Fixed by #14029
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation topic: cabling type: bug A confirmed report of unexpected behavior in the application

Comments

@penM000
Copy link

penM000 commented Oct 12, 2023

NetBox version

v3.6.3

Python version

3.8

Steps to Reproduce

  1. Registers wiring that would result in an L2 loop to the same device.
  2. Select these two to delete the cable.
  3. An error occurs and the cable is not deleted.
    image
    image
    image
    image

Expected Behavior

Expect the cable to be removed.

Observed Behavior

The error shown in the image has been identified.

@penM000 penM000 added the type: bug A confirmed report of unexpected behavior in the application label Oct 12, 2023
@abhi1693 abhi1693 added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation topic: cabling severity: low Does not significantly disrupt application functionality, or a workaround is available labels Oct 12, 2023
@DanSheps
Copy link
Member

This same issue is also present (or at least was) when deleting duplex cables to a different device.

The solution is to get the cables and build a unique set.

@DanSheps DanSheps added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Oct 12, 2023
@DanSheps DanSheps self-assigned this Oct 12, 2023
DanSheps added a commit that referenced this issue Oct 12, 2023
@jeremystretch jeremystretch changed the title Error when deleting multiple wires Error when deleting multiple cables Oct 13, 2023
@jeremystretch
Copy link
Member

This issue was originally titled "Error when deleting multiple wires." In the future, please be careful to use accurate terminology when filing issues, both to prevent confusion and to ensure your issue appears in relevant searches.

jeremystretch added a commit that referenced this issue Oct 13, 2023
…ached to the same cable (#14029)

* Fixes: #14023 - Fixes bulk disconnecting with multiple components attached to the same cable

* Update netbox/dcim/views.py

Co-authored-by: Jeremy Stretch <[email protected]>

* Update netbox/dcim/views.py

Co-authored-by: Jeremy Stretch <[email protected]>

* Update netbox/dcim/views.py

Co-authored-by: Daniel Sheppard <[email protected]>

* Code cleanup & i18n fix

* Restore original termination count logic

---------

Co-authored-by: Jeremy Stretch <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation topic: cabling type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
4 participants