diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2012-08-13 09:15:20 +0300 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2012-08-13 09:15:20 +0300 |
| commit | 1930b899bd69fb084856257598ab5ddd8ee4e016 (patch) | |
| tree | c126369e20daa00ce8f290ae121ae4c8623df686 | |
| parent | 8a1f439d3aca3a021a43ba6c4235c3ac68908657 (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__.py | 2 |
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) |
