From: Christian Heller Date: Sun, 9 Jun 2024 05:30:46 +0000 (+0200) Subject: Simplify and improve previous bugfix. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/static/index.html?a=commitdiff_plain;h=6c3fca10aa663422abc48b96b38628dc2771701a;p=plomtask Simplify and improve previous bugfix. --- diff --git a/plomtask/http.py b/plomtask/http.py index 44c710b..71305b2 100644 --- a/plomtask/http.py +++ b/plomtask/http.py @@ -389,8 +389,7 @@ class TaskHandler(BaseHTTPRequestHandler): todo.set_blockers(self.conn, self.form_data.get_all_int('blocker')) todo.set_enables(self.conn, self.form_data.get_all_int('enables')) todo.set_disables(self.conn, self.form_data.get_all_int('disables')) - if len(self.form_data.get_all_str('done')) > 0 != todo.is_done: - todo.is_done = len(self.form_data.get_all_str('done')) > 0 + todo.is_done = len(self.form_data.get_all_str('done')) > 0 todo.calendarize = len(self.form_data.get_all_str('calendarize')) > 0 todo.comment = self.form_data.get_str('comment', ignore_strict=True) todo.save(self.conn) diff --git a/templates/todo.html b/templates/todo.html index 05e5b62..fd16680 100644 --- a/templates/todo.html +++ b/templates/todo.html @@ -18,11 +18,13 @@ done -
+ +{% if not todo.is_doable and todo.is_done %}{% endif %} + effort -
+ comment