Rack Groups/Locations allow assigning self as parent #4736

Closed
opened 2025-12-29 19:20:00 +01:00 by adam · 1 comment
Owner

Originally created by @abrahamvegh on GitHub (Apr 8, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

2.11.0-dev

Python version

3.8

Steps to Reproduce

  1. Create a Location
  2. After creating the Location, edit the Location
  3. The ‘Parent’ dropdown presents the Location as an option
  4. Attempt to save the Location with itself as the parent

Expected Behavior

The dropdown should either not present or not allow selection of the current Location as the Parent.

Preventing selection (disable the option) may be preferable to not presenting, in cases of more complex hierarchies.

Observed Behavior

<class 'mptt.exceptions.InvalidMove'>

A node may not be made a child of itself.

I noticed this in my production instance, and reproduced it on the beta instance since Rack Groups are now Locations, with identical results.

Originally created by @abrahamvegh on GitHub (Apr 8, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version 2.11.0-dev ### Python version 3.8 ### Steps to Reproduce 1. Create a Location 2. After creating the Location, edit the Location 3. The ‘Parent’ dropdown presents the Location as an option 4. Attempt to save the Location with itself as the parent ### Expected Behavior The dropdown should either not present or not allow selection of the current Location as the Parent. Preventing selection (disable the option) may be preferable to not presenting, in cases of more complex hierarchies. ### Observed Behavior ``` <class 'mptt.exceptions.InvalidMove'> A node may not be made a child of itself. ``` I noticed this in my production instance, and reproduced it on the beta instance since Rack Groups are now Locations, with identical results.
adam added the type: bugstatus: accepted labels 2025-12-29 19:20:00 +01:00
adam closed this issue 2025-12-29 19:20:00 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 9, 2021):

Seems like we have the same problem within other models (e.g. regions) on v2.10 as well.

@jeremystretch commented on GitHub (Apr 9, 2021): Seems like we have the same problem within other models (e.g. regions) on v2.10 as well.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4736