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)