Opened 15 years ago
Closed 15 years ago
#11783 closed (fixed)
django.contrib.humanize.templatetags.ordinal throws TypeError for NoneType
Reported by: | realpolitik | Owned by: | nobody |
---|---|---|---|
Component: | Contrib apps | Version: | 1.1 |
Severity: | Keywords: | contrib, humanize, ordinal, ValueError | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The short summary probably covered everything. ordinal(value) catches ValueError but not TypeError.
Error Message: "Exception Value: int() argument must be a string or a number, not 'NoneType'"
Attachments (2)
Change History (8)
comment:1 by , 15 years ago
Needs tests: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 15 years ago
Patch needs improvement: | set |
---|
by , 15 years ago
Attachment: | humanize_ordinal_TypeError.diff added |
---|
humanize ordinal TypeError? fix (updated)
comment:3 by , 15 years ago
Patch needs improvement: | unset |
---|
by , 15 years ago
Attachment: | humanize_ordinal_TypeError_with_tests.diff added |
---|
Updated diff with test case
comment:4 by , 15 years ago
Needs tests: | unset |
---|
Added a test to the patch to check for the None TypeError
comment:5 by , 15 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:6 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
That should be: