From 4ac1de31cd02248b8847f7c119e205bf6e34559e Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Tue, 26 Jun 2007 12:59:49 +0000 Subject: [PATCH] Fixed #4686 -- Do not permit empty strings in IPAddressField. Should be fully backwards compatible, but fixes an Oracle subtlety. Thanks, Ian Kelly. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5544 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/fields/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index 016e26099b..3af8a41adc 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -800,6 +800,7 @@ class IntegerField(Field): return super(IntegerField, self).formfield(**defaults) class IPAddressField(Field): + empty_strings_allowed = False def __init__(self, *args, **kwargs): kwargs['maxlength'] = 15 Field.__init__(self, *args, **kwargs)