Ticket #11297: patch.diff

File patch.diff, 828 bytes (added by Salva Pinyol, 15 years ago)
  • django/contrib/admin/templatetags/admin_list.py

     
    208208            elif f.flatchoices:
    209209                result_repr = dict(f.flatchoices).get(field_val, EMPTY_CHANGELIST_VALUE)
    210210            else:
    211                 result_repr = escape(field_val)
     211                if field_val is not None:
     212                    result_repr = escape(field_val)
     213                else:
     214                    result_repr = EMPTY_CHANGELIST_VALUE
    212215        if force_unicode(result_repr) == '':
    213216            result_repr = mark_safe(' ')
    214217        # If list_display_links not defined, add the link tag to the first field
Back to Top