diff options
| author | fredericsureau <frederic.sureau@gmail.com> | 2016-09-12 14:21:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-09-12 14:21:57 +0200 |
| commit | a1f1655f063f8f6e20ec940b9dd20d1945e5a770 (patch) | |
| tree | 1cfec6db6f71bfb993b030865bc9fc8677086f8d /budget/forms.py | |
| parent | 6bcf5e3aa234b7796cc5b9ec652acd4c71a56724 (diff) | |
| download | ihatemoney-mirror-a1f1655f063f8f6e20ec940b9dd20d1945e5a770.zip ihatemoney-mirror-a1f1655f063f8f6e20ec940b9dd20d1945e5a770.tar.gz ihatemoney-mirror-a1f1655f063f8f6e20ec940b9dd20d1945e5a770.tar.bz2 | |
Allow negative bill amounts
Diffstat (limited to 'budget/forms.py')
| -rw-r--r-- | budget/forms.py | 4 |
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")) |
