소스 검색

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

Jeremy Stretch 1 년 전
부모
커밋
3d1334a798
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      netbox/dcim/forms/bulk_edit.py

+ 7 - 0
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