Skip to content

Rack Groups/Locations allow assigning self as parent #6117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
abrahamvegh opened this issue Apr 8, 2021 · 1 comment
Closed

Rack Groups/Locations allow assigning self as parent #6117

abrahamvegh opened this issue Apr 8, 2021 · 1 comment
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@abrahamvegh
Copy link
Contributor

abrahamvegh commented Apr 8, 2021

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.

@abrahamvegh abrahamvegh added the type: bug A confirmed report of unexpected behavior in the application label Apr 8, 2021
@jeremystretch jeremystretch added the beta Concerns a bug/feature in a beta release label Apr 8, 2021
@jeremystretch
Copy link
Member

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

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed beta Concerns a bug/feature in a beta release labels Apr 9, 2021
@jeremystretch jeremystretch self-assigned this Apr 11, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants