1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ihatemoney_ynh.git synced 2024-09-03 19:26:15 +02:00

Small fix in CommaDecimalField class

This commit is contained in:
A.Avenel 2011-11-03 13:33:11 +01:00
parent 6df3bcdf13
commit e20c3bdb6b

View file

@ -48,6 +48,7 @@ def get_billform_for(project, set_default=True, **kwargs):
class CommaDecimalField(DecimalField): class CommaDecimalField(DecimalField):
"""A class to deal with comma in Decimal Field""" """A class to deal with comma in Decimal Field"""
def process_formdata(self, value): def process_formdata(self, value):
if value:
value[0] = str(value[0]).replace(',', '.') value[0] = str(value[0]).replace(',', '.')
return super(CommaDecimalField, self).process_formdata(value) return super(CommaDecimalField, self).process_formdata(value)