Skip to content
Snippets Groups Projects
Commit d37612e8 authored by Administrator's avatar Administrator
Browse files

coerce todostates to todostates (and not ints) for new todo form

parent 30f6ab8d
Branches
No related tags found
No related merge requests found
...@@ -159,7 +159,7 @@ class NewTodoForm(FlaskForm): ...@@ -159,7 +159,7 @@ class NewTodoForm(FlaskForm):
protocoltype_id = SelectField("Typ", choices=[], coerce=int) protocoltype_id = SelectField("Typ", choices=[], coerce=int)
who = StringField("Person", validators=[InputRequired("Bitte gib an, wer das Todo erledigen soll.")]) who = StringField("Person", validators=[InputRequired("Bitte gib an, wer das Todo erledigen soll.")])
description = StringField("Aufgabe", validators=[InputRequired("Bitte gib an, was erledigt werden soll.")]) description = StringField("Aufgabe", validators=[InputRequired("Bitte gib an, was erledigt werden soll.")])
state = SelectField("Status", choices=[], coerce=int, validators=[CheckTodoDateByState()]) state = SelectField("Status", choices=[], coerce=coerce_todostate, validators=[CheckTodoDateByState()])
date = DateField("Datum", format="%d.%m.%Y", validators=[Optional()]) date = DateField("Datum", format="%d.%m.%Y", validators=[Optional()])
def __init__(self, protocoltypes, **kwargs): def __init__(self, protocoltypes, **kwargs):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment