summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-05-15 08:07:37 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-05-15 08:07:37 +0200
commit9668991c16d1576412fa2e6e7523368275bdd07f (patch)
treea79877483d426915998952766693d23faf4e67f7
parentff3e594b6ba7c0130c676c16ed642399cec312cd (diff)
downloadIshtar-9668991c16d1576412fa2e6e7523368275bdd07f.tar.bz2
Ishtar-9668991c16d1576412fa2e6e7523368275bdd07f.zip
Float field: fix clean with native float
-rw-r--r--ishtar_common/forms.py2
1 files changed, 1 insertions, 1 deletions
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)