Make admin form lists work a bit better with non-ascii content in non-unicode tables.

- Legacy-Id: 3203
This commit is contained in:
Henrik Levkowetz 2011-07-23 12:23:10 +00:00
parent 6fcf8ad76d
commit aeff74a467

View file

@ -965,7 +965,7 @@ class ModelChoiceField(ChoiceField):
generate the labels for the choices presented by this object. Subclasses
can override this method to customize the display of the choices.
"""
return smart_unicode(obj)
return smart_unicode(obj, errors='ignore')
def _get_choices(self):
# If self._choices is set, then somebody must have manually set