home · contact · privacy
Minor refactoring.
[plomtask] / plomtask / http.py
index 5a7126e3232176630d78ddd43b10bb659c425e94..5d165ecf90f1ca6ebaed77e55b73a5d55ff428b8 100644 (file)
@@ -209,12 +209,7 @@ class TaskHandler(BaseHTTPRequestHandler):
         if child_id is not None:
             child = Todo.by_id(conn, child_id)
             todo.add_child(child)
-        if len(form_data.get_all_str('done')) > 0:
-            if not todo.is_doable:
-                raise BadFormatException('cannot set undoable Todo to done')
-            todo.is_done = True
-        else:
-            todo.is_done = False
+        todo.is_done = len(form_data.get_all_str('done')) > 0
         todo.save(conn)
 
     def do_POST_process(self, conn: DatabaseConnection, params: ParamsParser,