Permalink
Browse files

Fixed #1336 -- USStateField no longer throws exception when data is None

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4422 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 1b0b3fe commit 81c839014d85161e851cc8c1d408055adcd94021 @adrianholovaty adrianholovaty committed Jan 25, 2007
Showing with 3 additions and 1 deletion.
  1. +3 −1 django/oldforms/__init__.py
View
4 django/oldforms/__init__.py
@@ -958,7 +958,9 @@ 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
+ return data
html2python = staticmethod(html2python)
class CommaSeparatedIntegerField(TextField):

0 comments on commit 81c8390

Please sign in to comment.