Skip to content
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

netbox v3.2-beta1 - dcim/device-types/inventory-items error "'component' does not resolve to an item" #8658

Closed
PieterL75 opened this issue Feb 16, 2022 · 5 comments
Assignees
Labels
beta Concerns a bug/feature in a beta release status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@PieterL75
Copy link
Contributor

NetBox version

v3.2-beta1

Python version

3.9

Steps to Reproduce

  1. Create a devicetype
  2. Create a Module Bay on that device type
  3. Create a new inventory item on that device type.
    (only complete the mandatory fields, leave the rest default)

Expected Behavior

The Inventory item is created without errors

Observed Behavior

After clicking the 'create' button, an error is thrown:

<class 'ValueError'>
'component' does not resolve to an item that supports prefetching - this is an invalid parameter to prefetch_related().
Python version: 3.8.10
NetBox version: 3.2.0-beta1

When refreshing, the inventory items was created properly.

I noticed that after this, creating inventory items work without errors

@PieterL75 PieterL75 added the type: bug A confirmed report of unexpected behavior in the application label Feb 16, 2022
@jeremystretch jeremystretch added the beta Concerns a bug/feature in a beta release label Feb 16, 2022
@jeremystretch
Copy link
Member

I'm not able to reproduce this currently, though I recall running into a similar issue with InventoryItemTable (for device items). It has something to do with the table attempting to prefetch component, which, as a generic foreign key, cannot be prefetched reliably.

@jeremystretch jeremystretch added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Feb 16, 2022
@jeremystretch
Copy link
Member

@PieterL75 have you uncovered a way to reproduce this reliably? I haven't seen any further reports so far.

@PieterL75
Copy link
Contributor Author

I'm not able to reproduce it... migth have been bad caching or something.

You may close the bugreport.. if I experience it again, I'll create a new bugreport

greetz

Pieter

@jeremystretch
Copy link
Member

Thanks!

@jeremystretch
Copy link
Member

I just happened to reproduce this today.

@jeremystretch jeremystretch reopened this Mar 3, 2022
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Mar 3, 2022
@jeremystretch jeremystretch self-assigned this Mar 3, 2022
This was referenced Apr 5, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beta Concerns a bug/feature in a beta release 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