mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-29 11:56:25 -06:00
Update netbox/dcim/models/racks.py
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
parent
abd8de2e50
commit
92fc311ff2
@ -179,9 +179,7 @@ class RackType(RackBase):
|
|||||||
super().clean()
|
super().clean()
|
||||||
|
|
||||||
# Validate outer dimensions and unit
|
# Validate outer dimensions and unit
|
||||||
if (
|
if any([self.outer_width, self.outer_depth, self.outer_height]) and not self.outer_unit:
|
||||||
self.outer_width is not None or self.outer_depth is not None or self.outer_height is not None
|
|
||||||
) and not self.outer_unit:
|
|
||||||
raise ValidationError(_("Must specify a unit when setting an outer width/depth/height"))
|
raise ValidationError(_("Must specify a unit when setting an outer width/depth/height"))
|
||||||
|
|
||||||
# Validate max_weight and weight_unit
|
# Validate max_weight and weight_unit
|
||||||
|
Loading…
Reference in New Issue
Block a user