mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
Fixes #3876: set min and max values for ASN field
This commit is contained in:
parent
6019260374
commit
4eacc57522
@ -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
|
||||
|
||||
---
|
||||
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user