Fix #1675 -- Allow '0' as answer to number questions (#1732)

Co-authored-by: Raphael Michel <michel@rami.io>
This commit is contained in:
Felix Rindt
2020-07-28 16:32:06 +02:00
committed by GitHub
parent 89e8d3d12f
commit 80b6a3d27d
3 changed files with 5 additions and 3 deletions

View File

@@ -570,7 +570,7 @@ class QuestionsStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
)
for q in cp.item.questions_to_ask:
if question_is_required(q) and not answ.get(q.id):
if question_is_required(q) and q.id not in answ:
if warn:
messages.warning(request, _('Please fill in answers to all required questions.'))
return False