aboutsummaryrefslogtreecommitdiff
path: root/budget/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'budget/forms.py')
-rw-r--r--budget/forms.py5
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