home · contact · privacy
Enable deletion of Todos.
[plomtask] / plomtask / http.py
index 7e2b241aec468a8b6c29221b6f146a702b990883..2b41db82e00e5d4cfac862161fb352607d09dfbb 100644 (file)
@@ -212,6 +212,10 @@ class TaskHandler(BaseHTTPRequestHandler):
     def do_POST_todo(self) -> str:
         """Update Todo and its children."""
         id_ = self.params.get_int('id')
+        for _ in self.form_data.get_all_str('delete'):
+            todo = Todo .by_id(self.conn, id_)
+            todo.remove(self.conn)
+            return '/'
         todo = Todo.by_id(self.conn, id_)
         adopted_child_ids = self.form_data.get_all_int('adopt')
         for child in todo.children: