Merge branch 'develop' into feature

This commit is contained in:
Jeremy Stretch
2024-10-16 08:13:43 -04:00
55 changed files with 8981 additions and 8255 deletions

View File

@@ -966,6 +966,13 @@ class Device(
'vc_position': _("A device assigned to a virtual chassis must have its position defined.")
})
if hasattr(self, 'vc_master_for') and self.vc_master_for and self.vc_master_for != self.virtual_chassis:
raise ValidationError({
'virtual_chassis': _('Device cannot be removed from virtual chassis {virtual_chassis} because it is currently designated as its master.').format(
virtual_chassis=self.vc_master_for
)
})
def _instantiate_components(self, queryset, bulk_create=True):
"""
Instantiate components for the device from the specified component templates.