summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnssi Kääriäinen <akaariai@gmail.com>2012-08-13 09:15:20 +0300
committerAnssi Kääriäinen <akaariai@gmail.com>2012-08-13 09:15:20 +0300
commit1930b899bd69fb084856257598ab5ddd8ee4e016 (patch)
treec126369e20daa00ce8f290ae121ae4c8623df686
parent8a1f439d3aca3a021a43ba6c4235c3ac68908657 (diff)
Refix #13844 -- Made FloatField aggregates work on Python 2.6 + Postgres
Fixed a regression introduced in 59a655988ee95e4b4e4646cebea88b620d8fcdd2.
-rw-r--r--django/db/backends/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py
index 9f64cfc5f0..77033390eb 100644
--- a/django/db/backends/__init__.py
+++ b/django/db/backends/__init__.py
@@ -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)