diff options
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 |
commit | 9668991c16d1576412fa2e6e7523368275bdd07f (patch) | |
tree | a79877483d426915998952766693d23faf4e67f7 /ishtar_common/forms.py | |
parent | ff3e594b6ba7c0130c676c16ed642399cec312cd (diff) | |
download | Ishtar-9668991c16d1576412fa2e6e7523368275bdd07f.tar.bz2 Ishtar-9668991c16d1576412fa2e6e7523368275bdd07f.zip |
Float field: fix clean with native float
Diffstat (limited to 'ishtar_common/forms.py')
-rw-r--r-- | ishtar_common/forms.py | 2 |
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) |