Replacing circuit termination after termination swap #5079

Closed
opened 2025-12-29 19:23:53 +01:00 by adam · 3 comments
Owner

Originally created by @BeArchiTek on GitHub (Jul 21, 2021).

NetBox version

v2.11.9

Python version

3.8

Steps to Reproduce

Following https://github.com/netbox-community/netbox/issues/6774

  1. Delete one of the termination endpoint
  2. Add a new one

Expected Behavior

New termination is added

Observed Behavior

Error regarding a duplicate entry

<class 'django.db.utils.IntegrityError'>

duplicate key value violates unique constraint "circuits_circuittermination_circuit_id_term_side_b13efd0e_uniq"
DETAIL: Key (circuit_id, term_side)=(7, A) already exists.

Python version: 3.8.10
NetBox version: 2.11.9

Originally created by @BeArchiTek on GitHub (Jul 21, 2021). ### NetBox version v2.11.9 ### Python version 3.8 ### Steps to Reproduce Following https://github.com/netbox-community/netbox/issues/6774 1. Delete one of the termination endpoint 2. Add a new one ### Expected Behavior New termination is added ### Observed Behavior Error regarding a duplicate entry <class 'django.db.utils.IntegrityError'> duplicate key value violates unique constraint "circuits_circuittermination_circuit_id_term_side_b13efd0e_uniq" DETAIL: Key (circuit_id, term_side)=(7, A) already exists. Python version: 3.8.10 NetBox version: 2.11.9
adam added the type: bug label 2025-12-29 19:23:53 +01:00
adam closed this issue 2025-12-29 19:23:53 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 21, 2021):

Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v2.11.9. Please re-confirm the reported behavior on the current stable release and adjust your post above as necessary. Remember to provide detailed steps that someone else can follow using a clean installation of NetBox to reproduce the issue. Remember to include the steps taken to create any initial objects or other data.

@jeremystretch commented on GitHub (Jul 21, 2021): Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v2.11.9. Please re-confirm the reported behavior on the current stable release and adjust your post above as necessary. Remember to provide detailed steps that someone else can follow using a clean installation of NetBox to reproduce the issue. Remember to include the steps taken to create any initial objects or other data.
Author
Owner

@BeArchiTek commented on GitHub (Jul 22, 2021):

Hello Jeremy,

  1. Add a new circuit
  2. Add a new A termination
  3. Add a new Z termination
  4. Swap the 2 terminations
  5. Delete termination Z (because of bug #6774, the 2 terminations will be deleted)
  6. Add a new A termination
    -> bug

Regards,

@BeArchiTek commented on GitHub (Jul 22, 2021): Hello Jeremy, 1. Add a new circuit 2. Add a new A termination 3. Add a new Z termination 4. Swap the 2 terminations 5. Delete termination Z (because of bug #6774, the 2 terminations will be deleted) 6. Add a new A termination -> bug Regards,
Author
Owner

@jeremystretch commented on GitHub (Jul 23, 2021):

Looks like the root cause of this is captured by #6774; no need for a separate bug report.

@jeremystretch commented on GitHub (Jul 23, 2021): Looks like the root cause of this is captured by #6774; no need for a separate bug report.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5079