#10172 fixes for Django 4.1

This commit is contained in:
Arthur
2022-09-12 09:59:37 -07:00
parent eb001f914c
commit 6fe1725a11
3 changed files with 9 additions and 8 deletions

View File

@@ -268,7 +268,7 @@ class DeviceType(NetBoxModel):
if (
self.subdevice_role != SubdeviceRoleChoices.ROLE_PARENT
) and self.devicebaytemplates.count():
) and self.pk and self.devicebaytemplates.count():
raise ValidationError({
'subdevice_role': "Must delete all device bay templates associated with this device before "
"declassifying it as a parent device."