-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Open
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
Description
Deployment Type
Self-hosted
NetBox Version
v4.2.3
Python Version
3.10
Steps to Reproduce
- Go to the NetBox UI and navigate to the Regions section.
Create a new region:Name: Hong Kong, Slug: HK
- After creation, create a child region from the UI with the following details:
Name: Hong Kong,Slug: HK (or any valid unique slug),Parent: Hong Kong (the region created in step 1)
- Observe that this is allowed and saved successfully.
- Now, attempt the same operation using the API:
Make a POST request to /api/dcim/regions/ with this payload:
{
"name": "Hong Kong",
"slug": "hk-kong",
"parent": <id_of_Hong_Kong_region_created_in _step_1>
}
Expected Behavior
The child region with the same name (Hong Kong) but a different slug should be created successfully under the parent Hong Kong, matching the behavior observed in the UI.
Observed Behavior
The API returns a 400 Bad Request with an error indicating that the name must be unique or conflicts with the parent, even though the UI allows it.
rraj9921 and yash-pal1
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