From 9668991c16d1576412fa2e6e7523368275bdd07f Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 15 May 2017 08:07:37 +0200 Subject: Float field: fix clean with native float --- ishtar_common/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ishtar_common/forms.py') diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py index ecae18c5e..7eb36f6cc 100644 --- a/ishtar_common/forms.py +++ b/ishtar_common/forms.py @@ -80,7 +80,7 @@ class FloatField(forms.FloatField): Allow the use of comma for separating float fields """ def clean(self, value): - if value: + if value and (isinstance(value, unicode) or isinstance(value, str)): value = value.replace(',', '.').replace('%', '') return super(FloatField, self).clean(value) -- cgit v1.2.3