-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
NetBox version
v3.3.7
Python version
3.9
Steps to Reproduce
- Create a cable between 2 blank interfaces
Using api to create a cable (/api/dcim/cables/)
data_cable = {
"a_terminations": [
{
"object_type": "dcim.interface",
"object_id": 31,
},
],
"b_terminations": [
{
"object_type": "dcim.interface",
"object_id": 59,
},
],
"status": "connected",
}
OK
2. Repeat with the same interface for B and another one for A
data_cable = {
"a_terminations": [
{
"object_type": "dcim.interface",
"object_id": 32,
},
],
"b_terminations": [
{
"object_type": "dcim.interface",
"object_id": 59,
},
],
"status": "connected",
}
- Error 500
Expected Behavior
Note the fact that the interface is already in use
Observed Behavior
django.db.utils.IntegrityError: duplicate key value violates unique constraint "dcim_cable_termination_unique_termination" DETAIL: Key (termination_type_id, termination_id)=(32, 59) already exists.
Metadata
Metadata
Assignees
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application