#4630: [newforms-admin] SplitDateTimeField - !TypeError when datetime is
blank=True,null=True
----------------------------------+-----------------------------------------
Reporter:  Glin <[EMAIL PROTECTED]>  |       Owner:  adrian         
  Status:  new                    |   Component:  Admin interface
 Version:  newforms-admin         |    Keywords:                 
   Stage:  Unreviewed             |   Has_patch:  0              
----------------------------------+-----------------------------------------
 When datetime db field (in model) is blank=True, null=True, then I get
 TypeError when submit(save) form for this model with no date and/or time
 filled in:
 
 {{{
 TypeError at /admin/cms/article/239/
 combine() argument 1 must be datetime.date, not None
 Request Method:         POST
 Request URL:    http://127.0.0.1:8000/admin/cms/article/239/
 Exception Type:         TypeError
 Exception Value:        combine() argument 1 must be datetime.date, not
 None
 Exception Location:     /usr/lib/python2.4/site-
 packages/django/newforms/fields.py in compress, line 561
 Python Executable:      /usr/bin/python
 Python Version:         2.4.3
 }}}
 
 Here are last few lines of traceback:
 {{{
  File "/usr/lib/python2.4/site-packages/django/newforms/forms.py" in
 _get_errors
   93. self.full_clean()
 File "/usr/lib/python2.4/site-packages/django/newforms/forms.py" in
 full_clean
   206. value = field.clean(value)
 File "/usr/lib/python2.4/site-packages/django/newforms/fields.py" in clean
   541. return self.compress(clean_data)
 File "/usr/lib/python2.4/site-packages/django/newforms/fields.py" in
 compress
   561. return datetime.datetime.combine(*data_list)
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4630>
Django Code <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