Opened 15 years ago
Closed 14 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: | Tim Kersten | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 1.1 |
Severity: | Keywords: | list_display, timefield | |
Cc: | Tim Kersten | 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
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)
Change History (6)
by , 15 years ago
Attachment: | timefield_check_for_none_fix.patch added |
---|
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Summary: | timefield's are showing as "(None)" in the list_display of the admin interface → timefield's are showing as "(None)" in the list_display of the admin interface when time is set to 0:00 |
---|
comment:3 by , 15 years ago
Triage Stage: | Unreviewed → 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 by , 15 years ago
Cc: | added |
---|
comment:5 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → 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.
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.