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