summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)