summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2006-09-22 03:10:49 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2006-09-22 03:10:49 +0000
commit8feee92045294e7d5baa0bd493b20ac5ddaa3385 (patch)
tree4dc430f51b3ee0b5da763f406cff8c4a9a32a7e6 /django
parentb46a093c4598385b3bc7fb5803ebe7bb0677fdd4 (diff)
Fixed #2685 -- Correctly process blank input for USStateField elements. Thanks,
dackze+django@gmail.com. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3785 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/forms/__init__.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/django/forms/__init__.py b/django/forms/__init__.py
index a4b823fefb..160efe652c 100644
--- a/django/forms/__init__.py
+++ b/django/forms/__init__.py
@@ -952,10 +952,7 @@ class USStateField(TextField):
raise validators.CriticalValidationError, e.messages
def html2python(data):
- if data:
- return data.upper() # Should always be stored in upper case
- else:
- return None
+ return data.upper() # Should always be stored in upper case
html2python = staticmethod(html2python)
class CommaSeparatedIntegerField(TextField):