Adding Inventory Items to a Device Type without an associated Inventory Item Type throws: 'component' does not resolve to an item that supports prefetching - this is an invalid parameter to prefetch_related(). #6213

Closed
opened 2025-12-29 19:38:06 +01:00 by adam · 2 comments
Owner

Originally created by @zeddD1abl0 on GitHub (Mar 15, 2022).

NetBox version

3.2.0-beta2

Python version

3.9

Steps to Reproduce

  1. Create a Device Template

NetboxErrorStep1
NetboxErrorStep2

  1. Add an Inventory Item without adding a Role

NetboxErrorStep4

  1. Click Create

Expected Behavior

The expected behavior would be for it to come back to the inventory items page, as per normal:

NetboxExpected

Observed Behavior

The server has an issue preloading related items. Probably because the inventory item has no role, thus nothing to preload.

NetboxError

Originally created by @zeddD1abl0 on GitHub (Mar 15, 2022). ### NetBox version 3.2.0-beta2 ### Python version 3.9 ### Steps to Reproduce 1. Create a Device Template ![NetboxErrorStep1](https://user-images.githubusercontent.com/8335605/158306978-13addea5-6ac1-4647-9f16-77348826e0a7.png) ![NetboxErrorStep2](https://user-images.githubusercontent.com/8335605/158306999-019c26a8-87f0-4e0d-8206-faabf528a4a8.png) 2. Add an Inventory Item without adding a Role ![NetboxErrorStep4](https://user-images.githubusercontent.com/8335605/158307019-919912b3-f2c5-47a8-af04-d49c2f8ead8a.png) 3. Click Create ### Expected Behavior The expected behavior would be for it to come back to the inventory items page, as per normal: ![NetboxExpected](https://user-images.githubusercontent.com/8335605/158307182-a0a47989-608c-4c47-969e-60873033ea52.png) ### Observed Behavior The server has an issue preloading related items. Probably because the inventory item has no role, thus nothing to preload. ![NetboxError](https://user-images.githubusercontent.com/8335605/158307273-8a9f94de-afc0-49b1-8275-1d8ee2f666a6.png)
adam added the type: bugstatus: duplicatebeta labels 2025-12-29 19:38:06 +01:00
adam closed this issue 2025-12-29 19:38:06 +01:00
Author
Owner

@zeddD1abl0 commented on GitHub (Mar 15, 2022):

Sorry if this one has been raised before. I couldn't find a reference, but I probably didn't look correctly.

You can fix it if you assign a role, but otherwise, it stays broken. I haven't checked after assigning an inventory item to an inventory without a role.

@zeddD1abl0 commented on GitHub (Mar 15, 2022): Sorry if this one has been raised before. I couldn't find a reference, but I probably didn't look correctly. You can fix it if you assign a role, but otherwise, it stays broken. I haven't checked after assigning an inventory item to an inventory without a role.
Author
Owner

@jeremystretch commented on GitHub (Mar 15, 2022):

Thank you for submitting this issue, however it appears that this topic has already been raised. Please see issue #8658 for further discussion.

@jeremystretch commented on GitHub (Mar 15, 2022): Thank you for submitting this issue, however it appears that this topic has already been raised. Please see issue #8658 for further discussion.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6213