Module types allow adding inventory item templates, however the form doesn't work #6542

Closed
opened 2025-12-29 19:42:08 +01:00 by adam · 1 comment
Owner

Originally created by @kkthxbye-code on GitHub (Jun 7, 2022).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.2.4

Python version

3.10

Steps to Reproduce

  1. Create a module type
  2. Add interfaces to the module type
  3. Go to the interface view of the module type (/dcim/module-types/1/interfaces/)
  4. Press the blue + button next to an interface
  5. Enter a name, press Create

Expected Behavior

I'm not sure that it is even intended that inventory item templates can be added to module-types, as the dropdown on the module type page doesn't allow adding inventory items like on the device type page.

If it is intended the expected behavior is that the inventory item template is saved on the module type.

If it is not intended the expected behavior is that the blue + butten is not visible on the interface list.

Observed Behavior

Form validation error when trying to save the inventory item template:

Device type

Select a valid choice. That choice is not one of the available choices.
Name

This field is required.

The URL when clicking the blue + looks like this:

/dcim/inventory-item-templates/add/?device_type=None&component_type=33&component_id=275&return_url=/dcim/module-types/1/interfaces/

The form fails no matter what you type because of hidden inputs for device-type and name, both of which are set to None.

Originally created by @kkthxbye-code on GitHub (Jun 7, 2022). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.2.4 ### Python version 3.10 ### Steps to Reproduce 1. Create a module type 2. Add interfaces to the module type 3. Go to the interface view of the module type (/dcim/module-types/1/interfaces/) 4. Press the blue + button next to an interface 5. Enter a name, press Create ### Expected Behavior I'm not sure that it is even intended that inventory item templates can be added to module-types, as the dropdown on the module type page doesn't allow adding inventory items like on the device type page. If it is intended the expected behavior is that the inventory item template is saved on the module type. If it is not intended the expected behavior is that the blue + butten is not visible on the interface list. ### Observed Behavior Form validation error when trying to save the inventory item template: ``` Device type Select a valid choice. That choice is not one of the available choices. ``` ``` Name This field is required. ``` The URL when clicking the blue + looks like this: `/dcim/inventory-item-templates/add/?device_type=None&component_type=33&component_id=275&return_url=/dcim/module-types/1/interfaces/` The form fails no matter what you type because of hidden inputs for device-type and name, both of which are set to None.
adam added the type: bugstatus: accepted labels 2025-12-29 19:42:08 +01:00
adam closed this issue 2025-12-29 19:42:09 +01:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 7, 2022):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Aug 7, 2022): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6542