mirror of
https://github.com/pretix/pretix.git
synced 2026-05-11 16:13:59 +00:00
Fix stepping back to the invoice address
This commit is contained in:
@@ -340,6 +340,7 @@ class QuestionsStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
|
||||
|
||||
@cached_property
|
||||
def invoice_form(self):
|
||||
if not self.invoice_address.pk:
|
||||
initial = {
|
||||
'name_parts': {
|
||||
k[21:].replace('-', '_'): v
|
||||
@@ -353,6 +354,8 @@ class QuestionsStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
|
||||
'city': self.cart_session.get('widget_data', {}).get('invoice-address-city', ''),
|
||||
'country': self.cart_session.get('widget_data', {}).get('invoice-address-country', ''),
|
||||
}
|
||||
else:
|
||||
initial = {}
|
||||
if not self.address_asked and self.request.event.settings.invoice_name_required:
|
||||
return InvoiceNameForm(data=self.request.POST if self.request.method == "POST" else None,
|
||||
event=self.request.event,
|
||||
|
||||
Reference in New Issue
Block a user