Commit d37612e8 authored by Administrator's avatar Administrator
Browse files

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

parent 30f6ab8d
......@@ -159,7 +159,7 @@ class NewTodoForm(FlaskForm):
protocoltype_id = SelectField("Typ", choices=[], coerce=int)
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.")])
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()])
def __init__(self, protocoltypes, **kwargs):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment