home · contact · privacy
Enable deletion of Processes.
[plomtask] / plomtask / http.py
index c8486003ce48fb785474432f512b08a380193a32..b4c2b0886c08baada1f848eb66e832a0ade99b72 100644 (file)
@@ -236,6 +236,10 @@ class TaskHandler(BaseHTTPRequestHandler):
     def do_POST_process(self) -> None:
         """Update or insert Process of ?id= and fields defined in postvars."""
         id_ = self.params.get_int_or_none('id')
+        for _ in self.form_data.get_all_str('delete'):
+            process = Process.by_id(self.conn, id_)
+            process.remove(self.conn)
+            return
         process = Process.by_id(self.conn, id_, create=True)
         process.title.set(self.form_data.get_str('title'))
         process.description.set(self.form_data.get_str('description'))