Error when creating device from device type with parent inventory item #7829

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

Originally created by @aurelienbyi on GitHub (Mar 31, 2023).

Originally assigned to: @arthanson, @jeremystretch on GitHub.

NetBox version

v3.4.7

Python version

3.10

Steps to Reproduce

  1. Create a new Device Types
  2. Add 1st Component : Inventory Item
  3. Add 2nd Component : Inventory Item, with 1st component as Parent
  4. Create a new Device from this Device type

Expected Behavior

New device created with Inventory Items from Device Type

Observed Behavior

Server error :

<class 'dcim.models.device_components.InventoryItem.DoesNotExist'>

InventoryItem matching query does not exist.

Python version: 3.10.6
NetBox version: 3.4.7

with debug :

DoesNotExist at /dcim/devices/add/
InventoryItem matching query does not exist.

Request Method:  POST
Django Version: 4.1.7
Exception Type: DoesNotExist
Exception Value: InventoryItem matching query does not exist.
Exception Location: /opt/netbox/venv/lib/python3.10/site-packages/django/db/models/query.py, line 650, in get
Raised during: dcim.views.DeviceEditView
Python Executable: /opt/netbox/venv/bin/python
Python Version: 3.10.6
Python Path : ['/opt/netbox/netbox/',  '/usr/lib/python310.zip',  '/usr/lib/python3.10',  '/usr/lib/python3.10/lib-dynload',  '/opt/netbox/venv/lib/python3.10/site-packages']
Originally created by @aurelienbyi on GitHub (Mar 31, 2023). Originally assigned to: @arthanson, @jeremystretch on GitHub. ### NetBox version v3.4.7 ### Python version 3.10 ### Steps to Reproduce 1. Create a new Device Types 2. Add 1st Component : Inventory Item 3. Add 2nd Component : Inventory Item, with 1st component as Parent 4. Create a new Device from this Device type ### Expected Behavior New device created with Inventory Items from Device Type ### Observed Behavior Server error : ``` <class 'dcim.models.device_components.InventoryItem.DoesNotExist'> InventoryItem matching query does not exist. Python version: 3.10.6 NetBox version: 3.4.7 ``` with debug : ``` DoesNotExist at /dcim/devices/add/ InventoryItem matching query does not exist. Request Method: POST Django Version: 4.1.7 Exception Type: DoesNotExist Exception Value: InventoryItem matching query does not exist. Exception Location: /opt/netbox/venv/lib/python3.10/site-packages/django/db/models/query.py, line 650, in get Raised during: dcim.views.DeviceEditView Python Executable: /opt/netbox/venv/bin/python Python Version: 3.10.6 Python Path : ['/opt/netbox/netbox/', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/opt/netbox/venv/lib/python3.10/site-packages'] ```
adam added the type: bugstatus: accepted labels 2025-12-29 20:28:45 +01:00
adam closed this issue 2025-12-29 20:28:45 +01:00
Author
Owner

@kkthxbye-code commented on GitHub (Apr 2, 2023):

This needs some logic like I created here in 3.5 for interface bridges:

https://github.com/netbox-community/netbox/pull/11869/files#diff-242fa4d6e937ebcf01bba9f882cf4f17a40799ef33b5637a00726fbfbaec7c1fR463-R476

@kkthxbye-code commented on GitHub (Apr 2, 2023): This needs some logic like I created here in 3.5 for interface bridges: https://github.com/netbox-community/netbox/pull/11869/files#diff-242fa4d6e937ebcf01bba9f882cf4f17a40799ef33b5637a00726fbfbaec7c1fR463-R476
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7829