Skip to content

Commit

Permalink
Fixed #4686 -- Do not permit empty strings in IPAddressField. Should …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
malcolmt committed Jun 26, 2007
1 parent fedcabe commit 4ac1de3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions django/db/models/fields/__init__.py
Expand Up @@ -800,6 +800,7 @@ def formfield(self, **kwargs):
return super(IntegerField, self).formfield(**defaults) return super(IntegerField, self).formfield(**defaults)


class IPAddressField(Field): class IPAddressField(Field):
empty_strings_allowed = False
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
kwargs['maxlength'] = 15 kwargs['maxlength'] = 15
Field.__init__(self, *args, **kwargs) Field.__init__(self, *args, **kwargs)
Expand Down

0 comments on commit 4ac1de3

Please sign in to comment.