Control: fix yes/no-question not being optional in order edit form

This commit is contained in:
Richard Schreiber
2023-03-06 09:08:20 +01:00
parent 9bed40fa09
commit 17715ff5a5
+1 -1
View File
@@ -719,7 +719,7 @@ class BaseQuestionsForm(forms.Form):
label = escape(q.question) # django-bootstrap3 calls mark_safe
required = q.required and not self.all_optional
if q.type == Question.TYPE_BOOLEAN:
if q.required:
if required:
# For some reason, django-bootstrap3 does not set the required attribute
# itself.
widget = forms.CheckboxInput(attrs={'required': 'required'})