Opened 17 years ago

Closed 17 years ago

#4447 closed (fixed)

[unicode] Admin crash when draw list of objects if field return None

Reported by: hidded <me@…> Owned by: Adrian Holovaty
Component: contrib.admin Version: other branch
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Subj. Testcase is below.

models.py:
    remote_addr = models.IPAddressField(blank=True, null=True,)
    class Admin:
        list_display = (..., 'remote_addr')

Attachments (1)

admin-list-with-none.diff (782 bytes ) - added by hidded <me@…> 17 years ago.

Download all attachments as: .zip

Change History (3)

by hidded <me@…>, 17 years ago

Attachment: admin-list-with-none.diff added

comment:1 by Malcolm Tredinnick, 17 years ago

Keywords: unicode removed
Triage Stage: UnreviewedAccepted

The fix is not really correct, because it's inconsistent handling for that one item when compared to everything else. But the bug report shows that what I wrote in the commit message for [5388] is wrong.

I'll have to think of a fix that works for both cases.

comment:2 by Malcolm Tredinnick, 17 years ago

Resolution: fixed
Status: newclosed

(In [5400]) unicode: Reverted [5388] and fixed the problem in a different way. Checked
every occurrence of smart_unicode() and force_unicode() that was not previously
a str() call, so hopefully the problems will not reoccur. Fixed #4447. Refs #4435, #4430.

Note: See TracTickets for help on using tickets.
Back to Top