Fixed #4518 -- Added handling of empty strings in typecast_decimal() for

SQLite's benefit. Thanks, Richard House.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5450 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2007-06-10 01:52:56 +00:00
parent 4a1dfe4240
commit 6fc10f50b0
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ def typecast_boolean(s):
return str(s)[0].lower() == 't'
def typecast_decimal(s):
if s is None:
if s is None or s == '':
return None
return decimal.Decimal(s)