#10244: FileFields can't be set to NULL in the db
------------------------------------+---------------------------------------
          Reporter:  oyvind         |         Owner:  nobody              
            Status:  new            |     Milestone:                      
         Component:  Uncategorized  |       Version:  1.0                 
        Resolution:                 |      Keywords:  filefield NULL empty
             Stage:  Unreviewed     |     Has_patch:  0                   
        Needs_docs:  0              |   Needs_tests:  0                   
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Comment (by oyvind):

 Example to test this issue:

 {{{
 #!python

 class File(models.Model):

     file = models.FileField(null=True, upload_to='files')
 }}}

 {{{
 #!python

 from models import File

 f = File()
 f.file = None
 f.save()

 from django.db import connection
 print connection.queries

 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10244#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 [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