diff options
| author | Alexis Metaireau <alexis@notmyidea.org> | 2011-10-08 13:22:18 +0200 |
|---|---|---|
| committer | Alexis Metaireau <alexis@notmyidea.org> | 2011-10-08 13:27:30 +0200 |
| commit | 48bc551853b8b0067cdaeef98b3e454c3249f98f (patch) | |
| tree | 75332a6548aba9d95e0771de2af0e9e19d53efbc /budget/forms.py | |
| parent | 402dbce153639668d47db00fdc7a0479d9ebc3f6 (diff) | |
| download | ihatemoney-mirror-48bc551853b8b0067cdaeef98b3e454c3249f98f.zip ihatemoney-mirror-48bc551853b8b0067cdaeef98b3e454c3249f98f.tar.gz ihatemoney-mirror-48bc551853b8b0067cdaeef98b3e454c3249f98f.tar.bz2 | |
Complete the REST API + Tests. Fix #27
Diffstat (limited to 'budget/forms.py')
| -rw-r--r-- | budget/forms.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/budget/forms.py b/budget/forms.py index 16fa0d6..25731bc 100644 --- a/budget/forms.py +++ b/budget/forms.py @@ -95,12 +95,13 @@ class BillForm(Form): validators=[Required()], widget=select_multi_checkbox) submit = SubmitField("Send the bill") - def save(self, bill): + def save(self, bill, project): bill.payer_id=self.payer.data bill.amount=self.amount.data bill.what=self.what.data bill.date=self.date.data - bill.owers = [Person.query.get(ower) for ower in self.payed_for.data] + bill.owers = [Person.query.get(ower, project) + for ower in self.payed_for.data] return bill |
