Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #2685 -- Correctly process blank input for USStateField element…

…s. Thanks,

dackze+django@gmail.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3785 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8feee92045294e7d5baa0bd493b20ac5ddaa3385 1 parent b46a093
Malcolm Tredinnick authored September 22, 2006

Showing 1 changed file with 1 addition and 4 deletions. Show diff stats Hide diff stats

  1. 5  django/forms/__init__.py
5  django/forms/__init__.py
@@ -952,10 +952,7 @@ def isValidUSState(self, field_data, all_data):
952 952
             raise validators.CriticalValidationError, e.messages
953 953
 
954 954
     def html2python(data):
955  
-        if data:
956  
-            return data.upper() # Should always be stored in upper case
957  
-        else:
958  
-            return None
  955
+        return data.upper() # Should always be stored in upper case
959 956
     html2python = staticmethod(html2python)
960 957
 
961 958
 class CommaSeparatedIntegerField(TextField):

0 notes on commit 8feee92

Please sign in to comment.
Something went wrong with that request. Please try again.