Code

Opened 7 years ago

Closed 7 years ago

#4447 closed (fixed)

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

Reported by: hidded <me@…> Owned by: adrian
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:

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@…> 7 years ago.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by hidded <me@…>

comment:1 Changed 7 years ago by mtredinnick

  • Keywords unicode removed
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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 7 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.