From 92fc311ff2b8eb73e6e2dc3681eca7932586298b Mon Sep 17 00:00:00 2001 From: Arthur Hanson Date: Thu, 20 Mar 2025 11:18:28 -0700 Subject: [PATCH] Update netbox/dcim/models/racks.py Co-authored-by: Jeremy Stretch --- netbox/dcim/models/racks.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/netbox/dcim/models/racks.py b/netbox/dcim/models/racks.py index c6a55121e..d86fc3af2 100644 --- a/netbox/dcim/models/racks.py +++ b/netbox/dcim/models/racks.py @@ -179,9 +179,7 @@ class RackType(RackBase): super().clean() # Validate outer dimensions and unit - if ( - 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: + if any([self.outer_width, self.outer_depth, self.outer_height]) and not self.outer_unit: raise ValidationError(_("Must specify a unit when setting an outer width/depth/height")) # Validate max_weight and weight_unit