From a1f1655f063f8f6e20ec940b9dd20d1945e5a770 Mon Sep 17 00:00:00 2001 From: fredericsureau Date: Mon, 12 Sep 2016 14:21:57 +0200 Subject: [PATCH] Allow negative bill amounts --- budget/forms.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/budget/forms.py b/budget/forms.py index 7d6eb51..4b59a36 100644 --- a/budget/forms.py +++ b/budget/forms.py @@ -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"))