Inventory items should not allow selecting itself as parent #6324

Closed
opened 2025-12-29 19:39:24 +01:00 by adam · 0 comments
Owner

Originally created by @drmsoffall on GitHub (Apr 8, 2022).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.2.0

Python version

3.8

Steps to Reproduce

  1. Create a new device
  2. Create an inventory item
  3. Edit inventory item
  4. Select same inventory item in Parent dropdown
  5. Click Save

Expected Behavior

Inventory item does not list itself in 'Parent' dropdown or, if not feasible, toast error instead of exception.

Observed Behavior

Server error:

<class 'mptt.exceptions.InvalidMove'>

A node may not be made a child of itself.
Originally created by @drmsoffall on GitHub (Apr 8, 2022). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.2.0 ### Python version 3.8 ### Steps to Reproduce 1. Create a new device 2. Create an inventory item 3. Edit inventory item 4. Select same inventory item in Parent dropdown 5. Click Save ### Expected Behavior Inventory item does not list itself in 'Parent' dropdown or, if not feasible, toast error instead of exception. ### Observed Behavior Server error: ``` <class 'mptt.exceptions.InvalidMove'> A node may not be made a child of itself. ```
adam added the type: bugstatus: accepted labels 2025-12-29 19:39:24 +01:00
adam closed this issue 2025-12-29 19:39:24 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6324