#12539: Error while validating non required IntegerField with localflavor form
field
-----------------------------------------------------+----------------------
          Reporter:  Bernd Schlapsi <b...@gmx.info>  |         Owner:  nobody
            Status:  closed                          |     Milestone:  1.2   
         Component:  Database layer (models, ORM)    |       Version:  SVN   
        Resolution:  worksforme                      |      Keywords:        
             Stage:  Accepted                        |     Has_patch:  1     
        Needs_docs:  0                               |   Needs_tests:  0     
Needs_better_patch:  0                               |  
-----------------------------------------------------+----------------------
Changes (by jkocherhans):

  * status:  new => closed
  * resolution:  => worksforme

Comment:

 I don't think auto-converting empty strings and unicode objects to `None`
 in the model fields (like your patch does) is the right approach. It seems
 like using a `CharField` as your model field, or making `ATZipCodeField`
 perform the conversion to an `int` via a `to_python` method would be a
 better idea.

 Also, I added the test from your patch to trunk r12271 without the fixes,
 and it passed. I this issue may have been fixed by [12206]. Please reopen
 if you have a test that fails on or after r12271.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12539#comment:2>
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 django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to