summaryrefslogtreecommitdiff
path: root/ishtar_common
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
commit4e1d107f3cb668375669e1efb93065ad77b61786 (patch)
treea79877483d426915998952766693d23faf4e67f7 /ishtar_common
parent56eafa6839505329e3adef1055ac729e8310681a (diff)
downloadIshtar-4e1d107f3cb668375669e1efb93065ad77b61786.tar.bz2
Ishtar-4e1d107f3cb668375669e1efb93065ad77b61786.zip
Float field: fix clean with native float
Diffstat (limited to 'ishtar_common')
-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)