Bulk editing inventory items fails because no device is selected by default #11159

Closed
opened 2025-12-29 21:41:08 +01:00 by adam · 2 comments
Owner

Originally created by @supertassu on GitHub (May 11, 2025).

Originally assigned to: @jeremystretch on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.3.0

Python Version

3.12

Steps to Reproduce

  1. Create a new device
  2. Create a new inventory item (Add components -> Inventory items, add some name)
  3. On the device inventory item list, select the item you created and click "edit selected"
  4. Do any edit to the item data (for example, set the "description" field to "test")
  5. Click "Apply"

Expected Behavior

Edits are saved

Observed Behavior

An error pops up in the bottom right corner ("This field cannot be null.")

I believe this error happens because the "Device" field is for some reason not being populated on the bulk edit form by default. In addition to fixing the form to populate the field, it'd be nice if the error message would actually identify the field with the problem.

Originally created by @supertassu on GitHub (May 11, 2025). Originally assigned to: @jeremystretch on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.3.0 ### Python Version 3.12 ### Steps to Reproduce 1. Create a new device 2. Create a new inventory item (Add components -> Inventory items, add some name) 3. On the device inventory item list, select the item you created and click "edit selected" 4. Do any edit to the item data (for example, set the "description" field to "test") 5. Click "Apply" ### Expected Behavior Edits are saved ### Observed Behavior An error pops up in the bottom right corner ("This field cannot be null.") I believe this error happens because the "Device" field is for some reason not being populated on the bulk edit form by default. In addition to fixing the form to populate the field, it'd be nice if the error message would actually identify the field with the problem.
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:41:08 +01:00
adam closed this issue 2025-12-29 21:41:08 +01:00
Author
Owner

@jnovinger commented on GitHub (May 12, 2025):

Thanks for the report, @supertassu . It looks like in this case the Device field is the one generating the error message. A short-term workaround is to simply select the device before saving. I realize that's not ideal, but better than the alternative until this is fixed.

Thanks!

@jnovinger commented on GitHub (May 12, 2025): Thanks for the report, @supertassu . It looks like in this case the `Device` field is the one generating the error message. A short-term workaround is to simply select the device before saving. I realize that's not ideal, but better than the alternative until this is fixed. Thanks!
Author
Owner

@jeremystretch commented on GitHub (May 13, 2025):

Note: This only happens when bulk editing inventory items from a specific device. It seems to work fine when performing a bulk edit from the global inventory items list.

@jeremystretch commented on GitHub (May 13, 2025): Note: This only happens when bulk editing inventory items from a specific device. It seems to work fine when performing a bulk edit from the global inventory items list.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11159