Skip to content

Commit aeff74a

Browse files
committed
Make admin form lists work a bit better with non-ascii content in non-unicode tables.
- Legacy-Id: 3203
1 parent 6fcf8ad commit aeff74a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

django/forms/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ def label_from_instance(self, obj):
965965
generate the labels for the choices presented by this object. Subclasses
966966
can override this method to customize the display of the choices.
967967
"""
968-
return smart_unicode(obj)
968+
return smart_unicode(obj, errors='ignore')
969969

970970
def _get_choices(self):
971971
# If self._choices is set, then somebody must have manually set

0 commit comments

Comments
 (0)