diff --git a/owrx/form/__init__.py b/owrx/form/__init__.py index 2001fd2..ecf17fd 100644 --- a/owrx/form/__init__.py +++ b/owrx/form/__init__.py @@ -184,7 +184,8 @@ class CheckboxInput(Input): def render_input(self, value): return """
- + + @@ -201,7 +202,9 @@ class CheckboxInput(Input): return " ".join(["form-check", "form-control-sm"]) def parse(self, data): - return {self.id: self.converter.convert_from_form(self.id in data and data[self.id][0] == "on")} + if self.id in data: + return {self.id: self.converter.convert_from_form("1" in data[self.id])} + return {} def getLabel(self): return self.checkboxText