From 156802cfa6fd264d5aa972f983fb089b6d95dc68 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Wed, 7 Aug 2024 14:57:06 +0200
Subject: [PATCH] Fix broken POST /condition parsing of "is active" setting.

---
 plomtask/http.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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)
-- 
2.30.2