home · contact · privacy
Fix minor ProcessStep POST handling bugs.
[plomtask] / plomtask / http.py
index 484147239ae8f3ef91d2ece69458d4b94c27e596..f5e24edecfc0c3bfb86700cc3a5d709db3f24c68 100644 (file)
@@ -341,8 +341,10 @@ class TaskHandler(BaseHTTPRequestHandler):
         process.set_disables(self.conn, self.form_data.get_all_int('disables'))
         process.calendarize = self.form_data.get_all_str('calendarize') != []
         process.save(self.conn)
-        process.explicit_steps = []
         steps: list[tuple[int | None, int, int | None]] = []
+        for step_id in self.form_data.get_all_int('keep_step'):
+            if step_id not in self.form_data.get_all_int('steps'):
+                raise BadFormatException('trying to keep unknown step')
         for step_id in self.form_data.get_all_int('steps'):
             for step_process_id in self.form_data.get_all_int(
                     f'new_step_to_{step_id}'):