mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 01:06:11 -06:00
12175 fix typo and test
This commit is contained in:
parent
080daba840
commit
affc927eb6
@ -241,7 +241,7 @@ class Rack(PrimaryModel, WeightMixin):
|
|||||||
).order_by('-position').first()
|
).order_by('-position').first()
|
||||||
if top_device:
|
if top_device:
|
||||||
min_height = top_device.position + top_device.device_type.u_height - 1
|
min_height = top_device.position + top_device.device_type.u_height - 1
|
||||||
if self.u_height + self.start_unit < min_height:
|
if self.u_height + self.starting_unit - 1 < min_height:
|
||||||
raise ValidationError({
|
raise ValidationError({
|
||||||
'u_height': "Rack must be at least {}U tall to house currently installed devices.".format(
|
'u_height': "Rack must be at least {}U tall to house currently installed devices.".format(
|
||||||
min_height
|
min_height
|
||||||
|
Loading…
Reference in New Issue
Block a user