From: Christian Heller Date: Wed, 7 Aug 2024 12:57:06 +0000 (+0200) Subject: Fix broken POST /condition parsing of "is active" setting. X-Git-Url: https://plomlompom.com/repos/te"st.html?a=commitdiff_plain;h=156802cfa6fd264d5aa972f983fb089b6d95dc68;p=plomtask Fix broken POST /condition parsing of "is active" setting. --- diff --git a/plomtask/http.py b/plomtask/http.py index 1aa2e49..2c8eecb 100644 --- a/plomtask/http.py +++ b/plomtask/http.py @@ -786,12 +786,11 @@ class TaskHandler(BaseHTTPRequestHandler): def do_POST_condition(self, condition: Condition) -> str: """Update/insert Condition of ?id= and fields defined in postvars.""" try: - is_active = self._form_data.get_str('is_active') == 'True' title = self._form_data.get_str('title') description = self._form_data.get_str('description') except NotFoundException as e: raise BadFormatException(e) from e - condition.is_active = is_active + condition.is_active = self._form_data.get_bool('is_active') condition.title.set(title) condition.description.set(description) condition.save(self.conn)