Browse Source

Fixes #199: Moved prefix_validator from BaseIPField to IPNetworkField

Jeremy Stretch 8 years ago
parent
commit
dc3cbfcdd4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      netbox/ipam/fields.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'