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

Fixes #4202: Prevent reassignment to master device when bulk editing VC member interfaces

Jeremy Stretch 6 лет назад
Родитель
Сommit
626513a8b2
2 измененных файлов с 3 добавлено и 0 удалено
  1. 1 0
      docs/release-notes/version-2.7.md
  2. 2 0
      netbox/dcim/forms.py

+ 1 - 0
docs/release-notes/version-2.7.md

@@ -15,6 +15,7 @@
 * [#4183](https://github.com/netbox-community/netbox/issues/4183) - Fix representation of NaturalOrderingField values in change log
 * [#4194](https://github.com/netbox-community/netbox/issues/4194) - Role field should not be required when searching/filtering secrets
 * [#4196](https://github.com/netbox-community/netbox/issues/4196) - Fix exception when viewing LLDP neighbors page
+* [#4202](https://github.com/netbox-community/netbox/issues/4202) - Prevent reassignment to master device when bulk editing VC member interfaces
 
 ---
 

+ 2 - 0
netbox/dcim/forms.py

@@ -2763,6 +2763,7 @@ class PowerOutletBulkEditForm(BootstrapMixin, AddRemoveTagsForm, BulkEditForm):
     device = forms.ModelChoiceField(
         queryset=Device.objects.all(),
         required=False,
+        disabled=True,
         widget=forms.HiddenInput()
     )
     type = forms.ChoiceField(
@@ -3060,6 +3061,7 @@ class InterfaceBulkEditForm(BootstrapMixin, AddRemoveTagsForm, BulkEditForm):
     device = forms.ModelChoiceField(
         queryset=Device.objects.all(),
         required=False,
+        disabled=True,
         widget=forms.HiddenInput()
     )
     type = forms.ChoiceField(