We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a964645 commit 9a655d8Copy full SHA for 9a655d8
netbox/dcim/models/devices.py
@@ -983,6 +983,13 @@ def clean(self):
983
'vc_position': _("A device assigned to a virtual chassis must have its position defined.")
984
})
985
986
+ if hasattr(self, 'vc_master_for') and self.vc_master_for and self.vc_master_for != self.virtual_chassis:
987
+ raise ValidationError({
988
+ 'virtual_chassis': _('Device cannot be removed from virtual chassis {virtual_chassis} because it is currently designated as its master.').format(
989
+ virtual_chassis=self.vc_master_for
990
+ )
991
+ })
992
+
993
def _instantiate_components(self, queryset, bulk_create=True):
994
"""
995
Instantiate components for the device from the specified component templates.
0 commit comments