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:
parent
6df3bcdf13
commit
e20c3bdb6b
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue