From 8890539545c5575cad1b1a0309dbfebcb1992413 Mon Sep 17 00:00:00 2001 From: Kevin Georgy Date: Wed, 4 Oct 2017 13:04:25 +0200 Subject: [PATCH] Removes unneeded lines, and set default value for coerce_to_string to be False insteed of None --- rest_framework/fields.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rest_framework/fields.py b/rest_framework/fields.py index d02332886..d76974eaf 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -957,9 +957,7 @@ class FloatField(Field): self.max_value = kwargs.pop('max_value', None) self.min_value = kwargs.pop('min_value', None) self.localize = kwargs.pop('localize', False) - self.coerce_to_string = kwargs.pop('coerce_to_string', None) - if self.localize: - self.coerce_to_string = True + self.coerce_to_string = kwargs.pop('coerce_to_string', False) super(FloatField, self).__init__(**kwargs) if self.max_value is not None: message = lazy(