X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=plomtask%2Fhttp.py;h=5d165ecf90f1ca6ebaed77e55b73a5d55ff428b8;hb=a0fc8b9ddabe3af5b2cc0592513ba3e69d5fd9d4;hp=5a7126e3232176630d78ddd43b10bb659c425e94;hpb=aed1d5968abf97976db3725347fe4e7672c935e7;p=plomtask diff --git a/plomtask/http.py b/plomtask/http.py index 5a7126e..5d165ec 100644 --- a/plomtask/http.py +++ b/plomtask/http.py @@ -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,