Opened 11 years ago

Closed 11 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: UI/UX:


Subj. Testcase is below.
    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@…> 11 years ago.

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by hidded <me@…>

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

comment:1 Changed 11 years ago by Malcolm Tredinnick

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 Changed 11 years ago by Malcolm Tredinnick

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