From fe0c4f987824108a2a135b96e5ae6d6e3e2ba661 Mon Sep 17 00:00:00 2001 From: Kevin Georgy Date: Wed, 16 Aug 2017 10:12:41 +0200 Subject: [PATCH] Fix string identification in python2.7 --- rest_framework/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 3b893fed1..e887ca306 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -944,7 +944,7 @@ class FloatField(Field): def to_internal_value(self, data): - if isinstance(data, six.text_type): + if isinstance(data, six.string_types): data = smart_text(data).strip()