Code

Ticket #9335: empty_field_unicode.diff

File empty_field_unicode.diff, 565 bytes (added by fas, 6 years ago)
Line 
1Index: django/forms/fields.py
2===================================================================
3--- django/forms/fields.py      (revision 9050)
4+++ django/forms/fields.py      (working copy)
5@@ -665,7 +665,7 @@
6 class TypedChoiceField(ChoiceField):
7     def __init__(self, *args, **kwargs):
8         self.coerce = kwargs.pop('coerce', lambda val: val)
9-        self.empty_value = kwargs.pop('empty_value', '')
10+        self.empty_value = kwargs.pop('empty_value', u'')
11         super(TypedChoiceField, self).__init__(*args, **kwargs)
12         
13     def clean(self, value):