Fixed #1336 -- USStateField no longer throws exception when data is None
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4422 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
1b0b3febe1
commit
81c839014d
|
@ -958,7 +958,9 @@ class USStateField(TextField):
|
||||||
raise validators.CriticalValidationError, e.messages
|
raise validators.CriticalValidationError, e.messages
|
||||||
|
|
||||||
def html2python(data):
|
def html2python(data):
|
||||||
|
if data:
|
||||||
return data.upper() # Should always be stored in upper case
|
return data.upper() # Should always be stored in upper case
|
||||||
|
return data
|
||||||
html2python = staticmethod(html2python)
|
html2python = staticmethod(html2python)
|
||||||
|
|
||||||
class CommaSeparatedIntegerField(TextField):
|
class CommaSeparatedIntegerField(TextField):
|
||||||
|
|
Loading…
Reference in New Issue