Kaydet (Commit) f15a983d authored tarafından Jacob Kaplan-Moss's avatar Jacob Kaplan-Moss

Fixed #1336 -- made USStateField work correctly when data is None (thanks, chrisb)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2427 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst da310cff
......@@ -875,7 +875,10 @@ class USStateField(TextField):
raise validators.CriticalValidationError, e.messages
def html2python(data):
return data.upper() # Should always be stored in upper case
if data:
return data.upper() # Should always be stored in upper case
else:
return None
html2python = staticmethod(html2python)
class CommaSeparatedIntegerField(TextField):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment