1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #9055: Restore ability to move inventory item to other device

This commit is contained in:
jeremystretch
2022-04-08 09:41:37 -04:00
parent 2269bf0167
commit 1e65ef0c1a
5 changed files with 16 additions and 6 deletions

View File

@@ -1204,6 +1204,10 @@ class InventoryItemBulkEditForm(
form_from_model(InventoryItem, ['label', 'role', 'manufacturer', 'part_id', 'description']),
NetBoxModelBulkEditForm
):
device = DynamicModelChoiceField(
queryset=Device.objects.all(),
required=False
)
role = DynamicModelChoiceField(
queryset=InventoryItemRole.objects.all(),
required=False
@@ -1215,7 +1219,7 @@ class InventoryItemBulkEditForm(
model = InventoryItem
fieldsets = (
(None, ('label', 'role', 'manufacturer', 'part_id', 'description')),
(None, ('device', 'label', 'role', 'manufacturer', 'part_id', 'description')),
)
nullable_fields = ('label', 'role', 'manufacturer', 'part_id', 'description')