home · contact · privacy
Fix Condition status not being saved on setting Todo.is_done from Day view.
authorChristian Heller <c.heller@plomlompom.de>
Mon, 29 Apr 2024 03:16:39 +0000 (05:16 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 29 Apr 2024 03:16:39 +0000 (05:16 +0200)
plomtask/http.py

index 196540a9ace22bee3fa9b2b6ebe2220a6a36e7d4..f5160f64d2504a3cf40733668623e1475eaa0cd8 100644 (file)
@@ -212,6 +212,10 @@ class TaskHandler(BaseHTTPRequestHandler):
             todo = Todo.by_id(self.conn, todo_id)
             todo.is_done = True
             todo.save(self.conn)
+            for condition in todo.enables:
+                condition.save(self.conn)
+            for condition in todo.disables:
+                condition.save(self.conn)
         return f'/day?date={date}'
 
     def do_POST_todo(self) -> str: