aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfredericsureau <frederic.sureau@gmail.com>2016-09-12 14:21:57 +0200
committerGitHub <noreply@github.com>2016-09-12 14:21:57 +0200
commita1f1655f063f8f6e20ec940b9dd20d1945e5a770 (patch)
tree1cfec6db6f71bfb993b030865bc9fc8677086f8d
parent6bcf5e3aa234b7796cc5b9ec652acd4c71a56724 (diff)
downloadihatemoney-mirror-a1f1655f063f8f6e20ec940b9dd20d1945e5a770.zip
ihatemoney-mirror-a1f1655f063f8f6e20ec940b9dd20d1945e5a770.tar.gz
ihatemoney-mirror-a1f1655f063f8f6e20ec940b9dd20d1945e5a770.tar.bz2
Allow negative bill amounts
-rw-r--r--budget/forms.py4
1 files changed, 1 insertions, 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"))