diff --git a/docs/release-notes/version-2.6.md b/docs/release-notes/version-2.6.md index ee6ea2e4d..abc65f12c 100644 --- a/docs/release-notes/version-2.6.md +++ b/docs/release-notes/version-2.6.md @@ -21,6 +21,7 @@ * [#3862](https://github.com/netbox-community/netbox/issues/3862) - Allow filtering device components by multiple device names * [#3864](https://github.com/netbox-community/netbox/issues/3864) - Disallow /0 masks * [#3872](https://github.com/netbox-community/netbox/issues/3872) - Paginate related IPs of an address +* [#3876](https://github.com/netbox-community/netbox/issues/3876) - Fixed min/max to ASN input field at the site creation page --- diff --git a/netbox/dcim/fields.py b/netbox/dcim/fields.py index 9624ce0a3..d8fef0d53 100644 --- a/netbox/dcim/fields.py +++ b/netbox/dcim/fields.py @@ -11,6 +11,11 @@ class ASNField(models.BigIntegerField): MaxValueValidator(4294967295), ] + def formfield(self, **kwargs): + defaults = {'min_value': 1, 'max_value': 4294967295} + defaults.update(**kwargs) + return super().formfield(**defaults) + class mac_unix_expanded_uppercase(mac_unix_expanded): word_fmt = '%.2X'