diff options
| author | Alexis Metaireau <alexis@notmyidea.org> | 2016-09-12 17:54:58 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-09-12 17:54:58 +0200 |
| commit | 7ba9048b0642d88e1298032243aa88a4a501afab (patch) | |
| tree | 2b7d0a478479e669e92e4c7d35613496d74f509a /budget/forms.py | |
| parent | 30904481aab39bcb33e52ae7ae844f363c9408cf (diff) | |
| parent | c9b2d17f603bd34dc15b66c123d7b17228362b33 (diff) | |
| download | ihatemoney-mirror-7ba9048b0642d88e1298032243aa88a4a501afab.zip ihatemoney-mirror-7ba9048b0642d88e1298032243aa88a4a501afab.tar.gz ihatemoney-mirror-7ba9048b0642d88e1298032243aa88a4a501afab.tar.bz2 | |
Merge pull request #150 from fredericsureau/negative-amounts
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")) |
