X-Git-Url: https://plomlompom.com/repos/day?a=blobdiff_plain;f=plomtask%2Fhttp.py;h=5a7126e3232176630d78ddd43b10bb659c425e94;hb=aed1d5968abf97976db3725347fe4e7672c935e7;hp=e65164ac0e24fa196435830bed014b1f0d654cc1;hpb=63249f5d7cefb97574610848ca3473cb1f9687e2;p=plomtask diff --git a/plomtask/http.py b/plomtask/http.py index e65164a..5a7126e 100644 --- a/plomtask/http.py +++ b/plomtask/http.py @@ -209,6 +209,12 @@ 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.save(conn) def do_POST_process(self, conn: DatabaseConnection, params: ParamsParser,