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)