home · contact · privacy
Minor ProcessStep management bug fixes.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 6 Jun 2024 01:16:34 +0000 (03:16 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 6 Jun 2024 01:16:34 +0000 (03:16 +0200)
plomtask/http.py
templates/process.html

index f28b09715cd734248d0dce6240a1aa6dada73014..f6c5dc71db70fb46abfd4b15aaa2cd8cd656410d 100644 (file)
@@ -376,8 +376,6 @@ class TaskHandler(BaseHTTPRequestHandler):
         process.set_blockers(self.conn, self.form_data.get_all_int('blocker'))
         process.set_enables(self.conn, self.form_data.get_all_int('enables'))
         process.set_disables(self.conn, self.form_data.get_all_int('disables'))
-        process.set_step_suppressions(self.conn,
-                                      self.form_data.get_all_int('suppresses'))
         process.calendarize = self.form_data.get_all_str('calendarize') != []
         process.save(self.conn)
         assert isinstance(process.id_, int)
@@ -403,6 +401,8 @@ class TaskHandler(BaseHTTPRequestHandler):
             steps += [ProcessStep(None, process.id_, step_process_id, None)]
         process.uncache()
         process.set_steps(self.conn, steps)
+        process.set_step_suppressions(self.conn,
+                                      self.form_data.get_all_int('suppresses'))
         process.save(self.conn)
         return f'/process?id={process.id_}'
 
index 200c6ea99ebe61bcf51cbee44d98a138ae576ac9..bc8d6e6d64305feeb710bda44c7f6e8de9f6ecb3 100644 (file)
@@ -25,7 +25,7 @@
 <td>
 {% if step_node.is_explicit %}
 add sub-step: <input name="new_step_to_{{step_id}}" list="step_candidates" autocomplete="off" />
-{% elif step_node.seen %}
+{% elif not step_node.seen %}
 <input type="checkbox" name="suppresses" value="{{step_id}}" {% if step_node.is_suppressed %}checked{% endif %}> suppress
 {% endif %}
 </td>