aboutsummaryrefslogtreecommitdiff
path: root/budget
diff options
context:
space:
mode:
authorA.Avenel <avenel.alexandre@gmail.com>2011-11-03 13:33:11 +0100
committerA.Avenel <avenel.alexandre@gmail.com>2011-11-03 13:33:11 +0100
commite20c3bdb6bea10d56e72d903952875da53cabd90 (patch)
treedf12a3501733160af125b3b04154cbc063a3de8b /budget
parent6df3bcdf1385a17e9d3d3dff6ba9278cb4e57247 (diff)
downloadihatemoney-mirror-e20c3bdb6bea10d56e72d903952875da53cabd90.zip
ihatemoney-mirror-e20c3bdb6bea10d56e72d903952875da53cabd90.tar.gz
ihatemoney-mirror-e20c3bdb6bea10d56e72d903952875da53cabd90.tar.bz2
Small fix in CommaDecimalField class
Diffstat (limited to 'budget')
-rw-r--r--budget/forms.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/budget/forms.py b/budget/forms.py
index 8db90be..f5c3fb5 100644
--- a/budget/forms.py
+++ b/budget/forms.py
@@ -48,7 +48,8 @@ def get_billform_for(project, set_default=True, **kwargs):
class CommaDecimalField(DecimalField):
"""A class to deal with comma in Decimal Field"""
def process_formdata(self, value):
- value[0] = str(value[0]).replace(',', '.')
+ if value:
+ value[0] = str(value[0]).replace(',', '.')
return super(CommaDecimalField, self).process_formdata(value)