From 3d1334a798db4d19216315262f838d8241766615 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 13 May 2025 13:23:02 -0400 Subject: [PATCH] Fixes #19464: Fix bulk editing of inventory items from device view (#19477) --- netbox/dcim/forms/bulk_edit.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/netbox/dcim/forms/bulk_edit.py b/netbox/dcim/forms/bulk_edit.py index 098c1a58e..9db7c250e 100644 --- a/netbox/dcim/forms/bulk_edit.py +++ b/netbox/dcim/forms/bulk_edit.py @@ -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