1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ihatemoney_ynh.git synced 2024-09-03 19:26:15 +02:00

I HAZ TO RUN TESTS BEFORE COMMITING

This commit is contained in:
Alexis Metaireau 2011-10-14 15:48:18 +02:00
parent 9c4fd0c210
commit 45ccc8b509
2 changed files with 3 additions and 3 deletions

0
budget/__init__.py Normal file
View file

View file

@ -30,8 +30,8 @@ def get_billform_for(project, set_default=True, **kwargs):
""" """
form = BillForm(**kwargs) form = BillForm(**kwargs)
form.payed_for.choices = form.payer.choices = [(str(m.id), m.name) for m in project.active_members] form.payed_for.choices = form.payer.choices = [(m.id, m.name) for m in project.active_members]
form.payed_for.default = [str(m.id) for m in project.active_members] form.payed_for.default = [m.id for m in project.active_members]
if set_default and request.method == "GET": if set_default and request.method == "GET":
form.set_default() form.set_default()
@ -103,7 +103,7 @@ class BillForm(Form):
payer = SelectField("Payer", validators=[Required()], coerce=int) payer = SelectField("Payer", validators=[Required()], coerce=int)
amount = DecimalField("Amount payed", validators=[Required()]) amount = DecimalField("Amount payed", validators=[Required()])
payed_for = SelectMultipleField("Who has to pay for this?", payed_for = SelectMultipleField("Who has to pay for this?",
validators=[Required()], widget=select_multi_checkbox) validators=[Required()], widget=select_multi_checkbox, coerce=int)
submit = SubmitField("Send the bill") submit = SubmitField("Send the bill")
def save(self, bill, project): def save(self, bill, project):