mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #5531: Ensure consistent calls to parent clean() methods for models, forms
This commit is contained in:
@@ -193,6 +193,7 @@ class PowerOutletTemplate(ComponentTemplateModel):
|
||||
unique_together = ('device_type', 'name')
|
||||
|
||||
def clean(self):
|
||||
super().clean()
|
||||
|
||||
# Validate power port assignment
|
||||
if self.power_port and self.power_port.device_type != self.device_type:
|
||||
@@ -278,6 +279,7 @@ class FrontPortTemplate(ComponentTemplateModel):
|
||||
)
|
||||
|
||||
def clean(self):
|
||||
super().clean()
|
||||
|
||||
# Validate rear port assignment
|
||||
if self.rear_port.device_type != self.device_type:
|
||||
|
||||
Reference in New Issue
Block a user