Fixes #19464: Fix bulk editing of inventory items from device view (#19477)

This commit is contained in:
Jeremy Stretch 2025-05-13 13:23:02 -04:00 committed by GitHub
parent 408550d3c7
commit 3d1334a798
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1779,6 +1779,13 @@ class InventoryItemBulkEditForm(
)
nullable_fields = ('label', 'role', 'manufacturer', 'part_id', 'description')
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Remove parent device passed as context to avoid conflicts with the actual device field
# on this form (see bug #19464)
self.initial.pop('device', None)
#
# Device component roles