Commit acc26c39 authored by Luc JEAN's avatar Luc JEAN

Fix #1022 Admin - not able to change ApplicationBooleanElementField : "checked" if value is true

parent 73f7f2d3
......@@ -157,7 +157,7 @@ class ApplicationBooleanElementPreviewWidget(forms.CheckboxInput):
def render(self, name, value, attrs=None, **kwargs):
if isinstance(value, str):
value = value != 'False'
value = (value.lower() == 'true')
return super().render(name, value, attrs, **kwargs)
......@@ -165,7 +165,7 @@ class ApplicationBooleanElementAdminWidget(ApplicationBooleanElementWidget):
def render(self, name, value, attrs=None, **kwargs):
if isinstance(value, str):
value = value != 'False'
value = (value.lower() == 'true')
return super().render(name, value, attrs, **kwargs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment