aboutsummaryrefslogtreecommitdiff
path: root/budget
diff options
context:
space:
mode:
authorAlexis Metaireau <alexis@notmyidea.org>2011-10-14 15:48:18 +0200
committerAlexis Metaireau <alexis@notmyidea.org>2011-10-14 15:48:31 +0200
commit45ccc8b509bc27f1301490272d71278a08bebe10 (patch)
tree3fbdb35a0405a1201e7d7a4875b6da7adc916fd8 /budget
parent9c4fd0c2105aae386cf23eb6f411ab6b9dfc2b7c (diff)
downloadihatemoney-mirror-45ccc8b509bc27f1301490272d71278a08bebe10.zip
ihatemoney-mirror-45ccc8b509bc27f1301490272d71278a08bebe10.tar.gz
ihatemoney-mirror-45ccc8b509bc27f1301490272d71278a08bebe10.tar.bz2
I HAZ TO RUN TESTS BEFORE COMMITING
Diffstat (limited to 'budget')
-rw-r--r--budget/__init__.py0
-rw-r--r--budget/forms.py6
2 files changed, 3 insertions, 3 deletions
diff --git a/budget/__init__.py b/budget/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/budget/__init__.py
diff --git a/budget/forms.py b/budget/forms.py
index 1049485..862cbc6 100644
--- a/budget/forms.py
+++ b/budget/forms.py
@@ -30,8 +30,8 @@ def get_billform_for(project, set_default=True, **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.default = [str(m.id) 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 = [m.id for m in project.active_members]
if set_default and request.method == "GET":
form.set_default()
@@ -103,7 +103,7 @@ class BillForm(Form):
payer = SelectField("Payer", validators=[Required()], coerce=int)
amount = DecimalField("Amount payed", validators=[Required()])
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")
def save(self, bill, project):