1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

14401 validate rack startion position > 0

This commit is contained in:
Arthur
2023-12-05 11:14:02 -08:00
committed by Jeremy Stretch
parent d10ac9b4a7
commit d2c3a39ebb
2 changed files with 19 additions and 0 deletions

View File

@@ -141,6 +141,7 @@ class Rack(ContactsMixin, ImageAttachmentsMixin, PrimaryModel, WeightMixin):
starting_unit = models.PositiveSmallIntegerField(
default=RACK_STARTING_UNIT_DEFAULT,
verbose_name=_('starting unit'),
validators=[MinValueValidator(1),],
help_text=_('Starting unit for rack')
)
desc_units = models.BooleanField(