Refix #13844 -- Made FloatField aggregates work on Python 2.6 + Postgres

Fixed a regression introduced in 59a655988e.
This commit is contained in:
Anssi Kääriäinen 2012-08-13 09:15:20 +03:00
parent 8a1f439d3a
commit 1930b899bd
1 changed files with 2 additions and 0 deletions

View File

@ -885,6 +885,8 @@ class BaseDatabaseOperations(object):
internal_type = field.get_internal_type()
if internal_type == 'DecimalField':
return value
elif internal_type == 'FloatField':
return float(value)
elif (internal_type and (internal_type.endswith('IntegerField')
or internal_type == 'AutoField')):
return int(value)