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

Allow negative bill amounts

This commit is contained in:
fredericsureau 2016-09-12 14:21:57 +02:00 committed by GitHub
parent 6bcf5e3aa2
commit a1f1655f06

View file

@ -143,9 +143,7 @@ class BillForm(Form):
self.payed_for.data = self.payed_for.default
def validate_amount(self, field):
if field.data < 0:
field.data = abs(field.data)
elif field.data == 0:
if field.data == 0:
raise ValidationError(_("Bills can't be null"))