def do_GET_todo(self) -> dict[str, object]:
"""Show single Todo of ?id=."""
- id_ = self.params.get_int_or_none('id')
+ id_ = self.params.get_int('id')
todo = Todo.by_id(self.conn, id_)
return {'todo': todo,
'todo_candidates': Todo.by_date(self.conn, todo.date),
def do_POST_todo(self) -> None:
"""Update Todo and its children."""
- id_ = self.params.get_int_or_none('id')
+ id_ = self.params.get_int('id')
todo = Todo.by_id(self.conn, id_)
child_id = self.form_data.get_int_or_none('adopt')
if child_id is not None: