Skip to content

Rack Groups/Locations allow assigning self as parent #6117

@abrahamvegh

Description

@abrahamvegh

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.

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions