#14321: IPAddressField inserted as empty string although null=True
------------------------------------------+---------------------------------
 Reporter:  [email protected]                 |       Owner:  nobody    
   Status:  new                           |   Milestone:            
Component:  Database layer (models, ORM)  |     Version:  SVN       
 Keywords:                                |       Stage:  Unreviewed
Has_patch:  0                             |  
------------------------------------------+---------------------------------
 I have these fields in a model:
 {{{
 #!python
         ipaddr1 = models.IPAddressField()
         ipaddr2 = models.IPAddressField(blank=True, null=True)
 }}}

 When I "wrap" this model in a ModelForm, fill the form, and call
 form.save(), empty ipaddr2 gets inserted as an empty string, causing
 database
 errors for Postgres' inet type.

 I believe Django shouldn't be disregarding null=true for an IPAddressField
 when dealing with Postgres.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/14321>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to