From 6c3fca10aa663422abc48b96b38628dc2771701a Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sun, 9 Jun 2024 07:30:46 +0200 Subject: [PATCH] Simplify and improve previous bugfix. --- plomtask/http.py | 3 +-- templates/todo.html | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) 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 -- 2.30.2