Refix #13844 -- Made FloatField aggregates work on Python 2.6 + Postgres
Fixed a regression introduced in 59a655988e
.
This commit is contained in:
parent
8a1f439d3a
commit
1930b899bd
|
@ -885,6 +885,8 @@ class BaseDatabaseOperations(object):
|
||||||
internal_type = field.get_internal_type()
|
internal_type = field.get_internal_type()
|
||||||
if internal_type == 'DecimalField':
|
if internal_type == 'DecimalField':
|
||||||
return value
|
return value
|
||||||
|
elif internal_type == 'FloatField':
|
||||||
|
return float(value)
|
||||||
elif (internal_type and (internal_type.endswith('IntegerField')
|
elif (internal_type and (internal_type.endswith('IntegerField')
|
||||||
or internal_type == 'AutoField')):
|
or internal_type == 'AutoField')):
|
||||||
return int(value)
|
return int(value)
|
||||||
|
|
Loading…
Reference in New Issue