Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #1336 -- made USStateField work correctly when data is None (th…

…anks, chrisb)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2427 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f15a983d88328f87b35390b827e3a747c6bf181b 1 parent da310cf
@jacobian jacobian authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 django/core/formfields.py
View
5 django/core/formfields.py
@@ -875,7 +875,10 @@ def isValidUSState(self, field_data, all_data):
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):
Please sign in to comment.
Something went wrong with that request. Please try again.