mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +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
|
@cached_property
|
||||||
def invoice_form(self):
|
def invoice_form(self):
|
||||||
|
if not self.invoice_address.pk:
|
||||||
initial = {
|
initial = {
|
||||||
'name_parts': {
|
'name_parts': {
|
||||||
k[21:].replace('-', '_'): v
|
k[21:].replace('-', '_'): v
|
||||||
@@ -353,6 +354,8 @@ class QuestionsStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
|
|||||||
'city': self.cart_session.get('widget_data', {}).get('invoice-address-city', ''),
|
'city': self.cart_session.get('widget_data', {}).get('invoice-address-city', ''),
|
||||||
'country': self.cart_session.get('widget_data', {}).get('invoice-address-country', ''),
|
'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:
|
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,
|
return InvoiceNameForm(data=self.request.POST if self.request.method == "POST" else None,
|
||||||
event=self.request.event,
|
event=self.request.event,
|
||||||
|
|||||||
Reference in New Issue
Block a user