#4976: The ordinal (contrib.humanize) templatetag fails when passing in None
-----------------------+----------------------------------------------------
Reporter:  anonymous   |       Owner:  adrian      
  Status:  new         |   Component:  Contrib apps
 Version:  SVN         |    Keywords:              
   Stage:  Unreviewed  |   Has_patch:  1           
-----------------------+----------------------------------------------------
 Calling django.contrib.humanize.templatetags.ordinal(None) raises an
 uncaught TypeError when casting None to an int.
 
 The patch simply adds an exception handler for a TypeError, which behaves
 like the ValueError handler (returning the original arg untouched.)
 
 The module lacked doctests, so I didn't add an ordinal(None) test.

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