Ticket #12016: timefield_check_for_none_fix.patch
File timefield_check_for_none_fix.patch, 819 bytes (added by , 15 years ago) |
---|
-
django/contrib/admin/templatetags/admin_list.py
183 183 result_repr = EMPTY_CHANGELIST_VALUE 184 184 # Dates and times are special: They're formatted in a certain way. 185 185 elif isinstance(f, models.DateField) or isinstance(f, models.TimeField): 186 if field_val :186 if field_val is not None: 187 187 (date_format, datetime_format, time_format) = get_date_formats() 188 188 if isinstance(f, models.DateTimeField): 189 189 result_repr = capfirst(dateformat.format(field_val, datetime_format))