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:
parent
4a1dfe4240
commit
6fc10f50b0
|
@ -91,7 +91,7 @@ def typecast_boolean(s):
|
||||||
return str(s)[0].lower() == 't'
|
return str(s)[0].lower() == 't'
|
||||||
|
|
||||||
def typecast_decimal(s):
|
def typecast_decimal(s):
|
||||||
if s is None:
|
if s is None or s == '':
|
||||||
return None
|
return None
|
||||||
return decimal.Decimal(s)
|
return decimal.Decimal(s)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue