Fix #2192 -- Invoice address name-field always gets overwritten with customer profile

This commit is contained in:
Raphael Michel
2021-09-06 20:57:45 +02:00
parent 4aa2c9d51d
commit 6388f7b29c
2 changed files with 4 additions and 3 deletions

View File

@@ -768,7 +768,7 @@ class QuestionsStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
wd_initial = {}
initial = dict(wd_initial)
if self.cart_customer:
if self.cart_customer and not self.invoice_address.pk:
initial.update({
'name_parts': self.cart_customer.name_parts
})
@@ -779,7 +779,8 @@ class QuestionsStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
override_sets = self._contact_override_sets
for overrides in override_sets:
initial.update({
k: v['initial'] for k, v in overrides.items() if 'initial' in v
k: v['initial'] for k, v in overrides.items()
if 'initial' in v and (v['disabled'] or not self.invoice_address.pk)
})
if not self.address_asked and self.request.event.settings.invoice_name_required: