-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Bug
Copy link
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: 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
Milestone
Description
Deployment Type
Self-hosted
NetBox Version
v4.3.4
Python Version
3.10
Steps to Reproduce
- Create device role A with no parent.
- Create device role B as a child of role B.
- Note the IDs of both roles. (In this example, we assume their IDs are 1 and 2.)
- Delete both roles using a single REST API request:
curl -X DELETE \
-H "Authorization: Token $TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json; indent=4" \
http://netbox:8000/api/dcim/device-roles/ \
--data '[
{"id": 1},
{"id": 2}
]'- Inspect the change log.
Expected Behavior
The API request should generate only two deletion records (one for either role).
Observed Behavior
A duplicate deletion record is generated for the child role.
I believe the first comes from the cascading deletion triggered by the deletion of the parent role; the second comes from the explicit deletion in the API request.
Metadata
Metadata
Assignees
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: 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