Parcourir la source

Fixes #5595: Restore ability to delete an uploaded device type image

Jeremy Stretch il y a 5 ans
Parent
commit
04964cc52b
2 fichiers modifiés avec 12 ajouts et 2 suppressions
  1. 10 0
      docs/release-notes/version-2.10.md
  2. 2 2
      netbox/dcim/forms.py

+ 10 - 0
docs/release-notes/version-2.10.md

@@ -1,5 +1,13 @@
 # NetBox v2.10
 
+## v2.10.7 (FUTURE)
+
+### Bug Fixes
+
+* [#5595](https://github.com/netbox-community/netbox/issues/5595) - Restore ability to delete an uploaded device type image
+
+---
+
 ## v2.10.6 (2021-03-09)
 
 ### Enhancements
@@ -19,6 +27,8 @@
 * [#5935](https://github.com/netbox-community/netbox/issues/5935) - Fix filtering prefixes list by multiple prefix values
 * [#5948](https://github.com/netbox-community/netbox/issues/5948) - Invalidate cached queries when running `renaturalize`
 
+---
+
 ## v2.10.5 (2021-02-24)
 
 ### Bug Fixes

+ 2 - 2
netbox/dcim/forms.py

@@ -944,10 +944,10 @@ class DeviceTypeForm(BootstrapMixin, CustomFieldModelForm):
         widgets = {
             'subdevice_role': StaticSelect2(),
             # Exclude SVG images (unsupported by PIL)
-            'front_image': forms.FileInput(attrs={
+            'front_image': forms.ClearableFileInput(attrs={
                 'accept': 'image/bmp,image/gif,image/jpeg,image/png,image/tiff'
             }),
-            'rear_image': forms.FileInput(attrs={
+            'rear_image': forms.ClearableFileInput(attrs={
                 'accept': 'image/bmp,image/gif,image/jpeg,image/png,image/tiff'
             })
         }