mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Check for required invoice information in other steps
This commit is contained in:
@@ -313,6 +313,14 @@ class QuestionsStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
|
||||
messages.warning(request, _('Please enter a valid email address.'))
|
||||
return False
|
||||
|
||||
if request.event.settings.invoice_address_required and (not self.invoice_address or not self.invoice_address.street):
|
||||
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):
|
||||
messages.warning(request, _('Please enter your name.'))
|
||||
return False
|
||||
|
||||
for cp in self.positions:
|
||||
answ = {
|
||||
aw.question_id: aw.answer for aw in cp.answers.all()
|
||||
|
||||
Reference in New Issue
Block a user