Просмотр исходного кода

Fixes #4474: Fix population of device types when bulk editing devices

Jeremy Stretch 5 лет назад
Родитель
Сommit
67f2cdc921
2 измененных файлов с 8 добавлено и 1 удалено
  1. 4 0
      docs/release-notes/version-2.8.md
  2. 4 1
      netbox/dcim/forms.py

+ 4 - 0
docs/release-notes/version-2.8.md

@@ -37,6 +37,10 @@ For NetBox plugins to be recognized, they must be installed and added by name to
 * [#4078](https://github.com/netbox-community/netbox/issues/4078) - Standardized description fields across all models
 * [#4195](https://github.com/netbox-community/netbox/issues/4195) - Enabled application logging (see [logging configuration](../configuration/optional-settings.md#logging))
 
+### Bug Fixes
+
+* [#4474](https://github.com/netbox-community/netbox/issues/4474) - Fix population of device types when bulk editing devices
+
 ### API Changes
 
 * The `_choices` API endpoints have been removed. Instead, use an `OPTIONS` request to a model's endpoint to view the available values for all fields. ([#3416](https://github.com/netbox-community/netbox/issues/3416))

+ 4 - 1
netbox/dcim/forms.py

@@ -2097,7 +2097,10 @@ class DeviceBulkEditForm(BootstrapMixin, AddRemoveTagsForm, CustomFieldBulkEditF
     )
     device_type = DynamicModelChoiceField(
         queryset=DeviceType.objects.all(),
-        required=False
+        required=False,
+        widget=APISelect(
+            display_field="model",
+        )
     )
     device_role = DynamicModelChoiceField(
         queryset=DeviceRole.objects.all(),