Parcourir la source

Fixes #199: Moved prefix_validator from BaseIPField to IPNetworkField

Jeremy Stretch il y a 8 ans
Parent
commit
d974cecda3
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1 1
      netbox/ipam/fields.py
  2. 1 1
      netbox/netbox/settings.py

+ 1 - 1
netbox/ipam/fields.py

@@ -16,7 +16,6 @@ def prefix_validator(prefix):
 
 
 class BaseIPField(models.Field):
-    default_validators = [prefix_validator]
 
     def python_type(self):
         return IPNetwork
@@ -51,6 +50,7 @@ class IPNetworkField(BaseIPField):
     IP prefix (network and mask)
     """
     description = "PostgreSQL CIDR field"
+    default_validators = [prefix_validator]
 
     def db_type(self, connection):
         return 'cidr'

+ 1 - 1
netbox/netbox/settings.py

@@ -11,7 +11,7 @@ except ImportError:
                                "the documentation.")
 
 
-VERSION = '1.0.7'
+VERSION = '1.0.7-r1'
 
 # Import local configuration
 for setting in ['ALLOWED_HOSTS', 'DATABASE', 'SECRET_KEY']: