From 48bc551853b8b0067cdaeef98b3e454c3249f98f Mon Sep 17 00:00:00 2001 From: Alexis Metaireau Date: Sat, 8 Oct 2011 13:22:18 +0200 Subject: Complete the REST API + Tests. Fix #27 --- budget/forms.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'budget/forms.py') 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 -- cgit v1.1