From 8feee92045294e7d5baa0bd493b20ac5ddaa3385 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Fri, 22 Sep 2006 03:10:49 +0000 Subject: [PATCH] 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 --- django/forms/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 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):