home · contact · privacy
Allow (de-)selection of owners in Process edit view.
[plomtask] / plomtask / http.py
index 2d5db82ccd2e85e7a56ae13c2e52134592efccd7..9bb96f9c3a23aab0e470feba437038796302ffe8 100644 (file)
@@ -244,7 +244,7 @@ class TaskHandler(BaseHTTPRequestHandler):
                 'steps': process.get_steps(self.conn),
                 'owners': process.used_as_step_by(self.conn),
                 'n_todos': len(Todo.by_process_id(self.conn, process.id_)),
-                'step_candidates': Process.all(self.conn),
+                'process_candidates': Process.all(self.conn),
                 'condition_candidates': Condition.all(self.conn)}
 
     def do_GET_process_titles(self) -> dict[str, object]:
@@ -415,6 +415,7 @@ class TaskHandler(BaseHTTPRequestHandler):
         process.set_step_suppressions(self.conn,
                                       self.form_data.get_all_int('suppresses'))
         process.save(self.conn)
+        process.set_owners(self.conn, self.form_data.get_all_int('step_of'))
         if new_process_title:
             title_b64_encoded = b64encode(new_process_title.encode()).decode()
             return f'/process?title_b64={title_b64_encoded}'