Code

Opened 5 years ago

Closed 4 years ago

#12016 closed (fixed)

timefield's are showing as "(None)" in the list_display of the admin interface when time is set to 0:00

Reported by: timkersten Owned by: nobody
Component: contrib.admin Version: 1.1
Severity: Keywords: list_display, timefield
Cc: timkersten Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

A timefield colume containing the time 00:00 would show up in the admin as "(None)" rather than "midnight" when displayed as part of the list_display.

The cause is an if statement that should be checking for None, rather than evaluating to False.

Attachments (1)

timefield_check_for_none_fix.patch (819 bytes) - added by timkersten 5 years ago.

Download all attachments as: .zip

Change History (6)

Changed 5 years ago by timkersten

comment:1 Changed 5 years ago by timkersten

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Forgot to mention that the patch is against trunk, specifically r11603, since the bug also exists there. I wasn't sure if the version for this bug report should be set to 1.1 or SVN since it's there in both.

comment:2 Changed 5 years ago by timkersten

  • Summary changed from timefield's are showing as "(None)" in the list_display of the admin interface to timefield's are showing as "(None)" in the list_display of the admin interface when time is set to 0:00

comment:3 Changed 4 years ago by timo

  • Triage Stage changed from Unreviewed to Ready for checkin

Confirmed this affects 1.1.X and that the fix works. Looks like this code has been refactored a bit on trunk, so this does not affect 1.2.

comment:4 Changed 4 years ago by timkersten

  • Cc timkersten added

comment:5 Changed 4 years ago by lukeplant

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

Since this does not affect trunk (according to timo), and we aren't fixing bugs on 1.1.X anymore, I'm just closing as FIXED.

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.