Do not require invoice address name if invoice address is not required

This commit is contained in:
Raphael Michel
2018-03-17 22:10:16 +01:00
parent 6df0147fe9
commit 3f55c694b8

View File

@@ -369,7 +369,8 @@ class QuestionsStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
messages.warning(request, _('Please enter your invoicing address.'))
return False
if request.event.settings.invoice_name_required and (not self.invoice_address or not self.invoice_address.name):
if request.event.settings.invoice_address_asked and request.event.settings.invoice_name_required and (
not self.invoice_address or not self.invoice_address.name):
messages.warning(request, _('Please enter your name.'))
return False