From b7ba8e43c4545d352f197237f349ab77e6a15544 Mon Sep 17 00:00:00 2001 From: Alexis Metaireau Date: Thu, 13 Oct 2011 21:24:13 +0200 Subject: [PATCH] Coerce the payer choice to int, default is unicode. Fix #33 --- budget/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/budget/forms.py b/budget/forms.py index cf5068b..1049485 100644 --- a/budget/forms.py +++ b/budget/forms.py @@ -100,7 +100,7 @@ class PasswordReminder(Form): class BillForm(Form): date = DateField("Date", validators=[Required()], default=datetime.now) what = TextField("What?", validators=[Required()]) - payer = SelectField("Payer", validators=[Required()]) + 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)