Error with creating non-unique child locations #5413

Closed
opened 2025-12-29 19:27:42 +01:00 by adam · 2 comments
Owner

Originally created by @kovalev94 on GitHub (Sep 23, 2021).

NetBox version

v2.11.12

Python version

3.9

Steps to Reproduce

I'm working in ISP company. In our data model, site-usually an apartment house with several entrances. In some of this entrances we have wall-mounted cabinets on a tech-floor and sometimes in a basement. So, my generic data model look like:
SomeSite->Entrance 3->Tech.floor
                ->Entrance 5->Tech.floor
                                      ->Basement
                ->Entrance 7->Tech. floor
But! I can implement this model, because netbox don't allow locations with the same name within one site, regardless wheter the location has parent or not(or has other parent)
I think this behavior breaks hierarchy model.

Sorry if my issue is duplicate or more feature request than a bug.

Expected Behavior

Locations with the same name but with different parents can be added to one site

Observed Behavior

Netbox return an error:
Location with this Site and Name already exists.
Location with this Site and Slug already exists.

Originally created by @kovalev94 on GitHub (Sep 23, 2021). ### NetBox version v2.11.12 ### Python version 3.9 ### Steps to Reproduce I'm working in ISP company. In our data model, site-usually an apartment house with several entrances. In some of this entrances we have wall-mounted cabinets on a tech-floor and sometimes in a basement. So, my generic data model look like: SomeSite->Entrance 3->Tech.floor                 ->Entrance 5->Tech.floor                                       ->Basement                 ->Entrance 7->Tech. floor But! I can implement this model, because netbox don't allow locations with the same name within one site, regardless wheter the location has parent or not(or has other parent) I think this behavior breaks hierarchy model. Sorry if my issue is duplicate or more feature request than a bug. ### Expected Behavior Locations with the same name but with different parents can be added to one site ### Observed Behavior Netbox return an error: Location with this Site and Name already exists. Location with this Site and Slug already exists.
adam added the type: bug label 2025-12-29 19:27:42 +01:00
adam closed this issue 2025-12-29 19:27:43 +01:00
Author
Owner

@DanSheps commented on GitHub (Sep 23, 2021):

This issue is pending closure as it does not conform to one of the provided templates as required by the contributing guide. If you'd like to request that your issue be re-opened, please first update the content so that it matches the appropriate template (this may require rewriting your issue entirely).

This would be a feature request, not a bug.

Please submit as a feature request. As a workaround, you can use maybe a unique identifier in the Location name or couple the location name with the site name and parent locations:

Site A -> Entrance A -> Site A, Entrance A, Tech Room
Site B -> Entrance A -> Site B, Entrance A, Tech Room

Etc

@DanSheps commented on GitHub (Sep 23, 2021): This issue is pending closure as it does not conform to one of the [provided templates](https://github.com/netbox-community/netbox/issues/new/choose) as required by the [contributing guide](https://github.com/netbox-community/netbox/blob/master/CONTRIBUTING.md). If you'd like to request that your issue be re-opened, please first update the content so that it matches the appropriate template (this may require rewriting your issue entirely). This would be a feature request, not a bug. Please submit as a feature request. As a workaround, you can use maybe a unique identifier in the Location name or couple the location name with the site name and parent locations: Site A -> Entrance A -> Site A, Entrance A, Tech Room Site B -> Entrance A -> Site B, Entrance A, Tech Room Etc
Author
Owner

@kovalev94 commented on GitHub (Sep 23, 2021):

Reopened as #7354

@kovalev94 commented on GitHub (Sep 23, 2021): Reopened as #7354
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5413