Skip to content

Commit

Permalink
Closes #14240: Increase min/max validation values for custom fields
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Dec 27, 2023
1 parent 00807d1 commit 25e27ee
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
23 changes: 23 additions & 0 deletions netbox/extras/migrations/0105_customfield_min_max_values.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2.8 on 2023-12-27 20:24

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('extras', '0104_stagedchange_remove_change_logging'),
]

operations = [
migrations.AlterField(
model_name='customfield',
name='validation_maximum',
field=models.BigIntegerField(blank=True, null=True),
),
migrations.AlterField(
model_name='customfield',
name='validation_minimum',
field=models.BigIntegerField(blank=True, null=True),
),
]
4 changes: 2 additions & 2 deletions netbox/extras/models/customfields.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ class CustomField(CloningMixin, ExportTemplatesMixin, ChangeLoggedModel):
verbose_name=_('display weight'),
help_text=_('Fields with higher weights appear lower in a form.')
)
validation_minimum = models.IntegerField(
validation_minimum = models.BigIntegerField(
blank=True,
null=True,
verbose_name=_('minimum value'),
help_text=_('Minimum allowed value (for numeric fields)')
)
validation_maximum = models.IntegerField(
validation_maximum = models.BigIntegerField(
blank=True,
null=True,
verbose_name=_('maximum value'),
Expand Down

0 comments on commit 25e27ee

Please sign in to comment.