home · contact · privacy
Hide (almost all) remaining SQL code in DB module.
[plomtask] / plomtask / http.py
index 5f739b685a3215197ca64566dfc602959a7eeef7..cc4358cfbf0365659fa89750e941c99533fd9a40 100644 (file)
@@ -134,7 +134,7 @@ class TaskHandler(BaseHTTPRequestHandler):
 
     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),
@@ -198,7 +198,7 @@ class TaskHandler(BaseHTTPRequestHandler):
 
     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: